Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
simon
Date:
Wed Oct 28 23:10:48 2009 +0000
Commit message:

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r db4f5f114f42 main.cpp
--- /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);
+    }
+}
diff -r 000000000000 -r db4f5f114f42 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Oct 28 23:10:48 2009 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/20a79241b4a0