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 mbed by
Revision 10:fcb9359f0959, committed 2009-05-14
- Comitter:
- simon.ford@mbed.co.uk
- Date:
- Thu May 14 14:44:00 2009 +0000
- Parent:
- 9:cf0d45ce28a6
- Child:
- 11:1c1ebd0324fa
- Commit message:
- Minor fix: Modified rtc time() functions to be in std namespace
Changed in this revision
Binary file mbed.ar has changed
--- a/mbed.h Wed Apr 15 14:15:04 2009 +0000 +++ b/mbed.h Thu May 14 14:44:00 2009 +0000 @@ -5,7 +5,7 @@ #ifndef MBED_H #define MBED_H -#define MBED_LIBRARY_VERSION 10 +#define MBED_LIBRARY_VERSION 11 // Useful C libraries #include <stdio.h> @@ -42,6 +42,7 @@ #include "rtc.h" using namespace mbed; +using namespace std; #endif
--- a/rtc.h Wed Apr 15 14:15:04 2009 +0000
+++ b/rtc.h Thu May 14 14:44:00 2009 +0000
@@ -7,6 +7,8 @@
#include <time.h>
+using namespace std;
+
#ifdef __ARMCC_VERSION
typedef unsigned long clockid_t;
@@ -24,6 +26,8 @@
extern "C" {
+namespace std {
+
/* Function: time
* Returns the number of seconds since the epoch (00:00:00 UTC,
* January 1, 1970), and also stores the return value in the address
@@ -31,17 +35,20 @@
*/
time_t time(time_t *timer);
+/* Function: stime
+ * Sets the current time, measured in seconds since the epoch, using
+ * the value pointed to by timer.
+ */
+void stime(const time_t *timer);
+
+}
+
/* Function: time_str
* Returns a pointer to a string representing the current time
* in human readable form, as generated by ctime()
*/
char *time_str();
-/* Function: stime
- * Sets the current time, measured in seconds since the epoch, using
- * the value pointed to by timer.
- */
-void stime(const time_t *timer);
/* Function: set_time
* Sets the current time, specifying year through to day
