RTC

Dependents:   GloboMet GloboMetereologico MPSMAX_copy

Revision:
0:86951afbcc3f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RTC.cpp	Sat Nov 19 18:46:24 2016 +0000
@@ -0,0 +1,21 @@
+#include "RTC.h"
+
+int tiempo;
+
+int RealTime::setdatetime(int hour, int min, int day, int mon, int year)
+
+{
+    struct tm t;
+    t.tm_sec=00;
+    t.tm_min=min;
+    t.tm_hour=hour;
+    t.tm_mday=day;
+    t.tm_mon=mon-1;
+    t.tm_year=year+100;
+    time_t seconds =mktime(&t);
+    tiempo=mktime(&t);
+    return tiempo;
+    wait (1);
+
+}
+