Dependencies:   mbed

Revision:
0:db4f5f114f42
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Oct 28 23:10:48 2009 +0000
@@ -0,0 +1,17 @@
+#include "mbed.h"
+
+int main() {
+    while(1) {
+        time_t seconds = time(NULL);
+
+        printf("Time as seconds since January 1, 1970 = %d\n", seconds);
+
+        printf("Time as a basic string = %s", ctime(&seconds));
+
+        char buffer[32];
+        strftime(buffer, 32, "%I:%M %p\n", localtime(&seconds));
+        printf("Time as a custom formatted string = %s", buffer);
+
+        wait(1);
+    }
+}