Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of hello by
Revision 5:e45300a80049, committed 2016-05-29
- Comitter:
- rfivet
- Date:
- Sun May 29 09:03:07 2016 +0000
- Parent:
- 4:d6bb51356400
- Commit message:
- Forked from hello. Endless loop and wait.
Changed in this revision
| hello.cpp | Show diff for this revision Revisions of this file | 
| uptime.cpp | Show annotated file Show diff for this revision Revisions of this file | 
--- a/hello.cpp	Sun May 29 06:38:51 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,8 +0,0 @@
-/* hello -- hello, world */
-
-#include "mbed.h"
-
-int main() {
-    printf( "hello, world\n") ;
-    return EXIT_SUCCESS ;
-}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/uptime.cpp	Sun May 29 09:03:07 2016 +0000
@@ -0,0 +1,14 @@
+/* uptime -- logs the number of seconds past since startup */
+
+#include "mbed.h"
+
+int main() {
+    int secs ;
+
+    for( secs = 1 ;; secs += 1) {
+        wait( 1) ;
+        printf( "uptime: %d seconds\n", secs) ;
+    }
+
+    return EXIT_SUCCESS ;   /* never reach here */
+}
\ No newline at end of file
    