 }
 
 void blePeripheralConnectHandler(BLECentral& central) {
-  if (central){
-    buffer.drawText(stringBuffer.start().put("connected...").get(),15,8,buffer.rgb(255,0,0), &virtualDJ_5ptFontInfo);
-    buffer.flush(display);
-    stringBuffer.reset();
+  buffer.drawText(stringBuffer.start().put("connected...").get(),15,8,buffer.rgb(255,0,0), &virtualDJ_5ptFontInfo);
+  buffer.flush(display);
+  stringBuffer.reset();
+  if(time.written()){
+    //Central wrote new time.
+    setTime(time.getValue());
   }
 }
 
 void blePeripheralDisconnectHandler(BLECentral& central) {
-  if (central){
-    buffer.drawText(stringBuffer.start().put("disconnected...").get(),15,8,buffer.rgb(255,0,0), &virtualDJ_5ptFontInfo);
-    buffer.flush(display);
-    stringBuffer.reset();
-  }
+  buffer.drawText(stringBuffer.start().put("disconnected...").get(),15,8,buffer.rgb(255,0,0), &virtualDJ_5ptFontInfo);
+  buffer.flush(display);
+  stringBuffer.reset();
 }
 
-//TODO: Method to render time.
-/*void renderTime(unsigned int n){
+void renderTime(){
   buffer.drawText(stringBuffer.start().putDec(hour()).put(":").putDec(minute()).put(":").putDec(second()).get(),15,8,buffer.rgb(255,0,0), &virtualDJ_5ptFontInfo);
-}*/
+}
 
 //TODO: Method to render date.
 /*void renderDate(unsigned int n){


//Uniquely identifies BLE peripheral, used for advertising.
BLEService service = BLEService("CCC0");
//Defines behavior of BLE peripheral.
BLECharCharacteristic characteristic = BLECharCharacteristic("CCC1", BLERead | BLENotify);
//Description of content sent via BLE peripheral.
BLEDescriptor desc = BLEDescriptor("CCC2", "value");

void setup() {
  BLESetup();

#include <SPI.h>
#include <TimeLib.h>
#include <BLEPeripheral.h>
#include "lib_RenderBuffer.h"
#include "lib_StringBuffer.h"
