Essai d'application Lycée Malraux NSI

Dependencies:   BLE_API nRF51822 mbed-dev-bin

Dependents:   microbit

Revision:
35:8ce23bc1af38
Parent:
32:ece16b5987dd
Child:
37:b624ae5e94a5
--- a/inc/core/MicroBitSystemTimer.h	Wed Jul 13 12:18:13 2016 +0100
+++ b/inc/core/MicroBitSystemTimer.h	Wed Jul 13 12:18:14 2016 +0100
@@ -43,7 +43,7 @@
 #include "MicroBitComponent.h"
 
 /**
-  * Initialises the system wide timer.
+  * Initialises a system wide timer, used to drive the various components used in the runtime.
   *
   * This must be called before any components register to receive periodic periodic callbacks.
   *
@@ -70,11 +70,26 @@
 int system_timer_get_period();
 
 /**
+  * Updates the current time in microseconds, since power on.
+  *
+  * If the mbed Timer hasn't been initialised, it will be initialised
+  * on the first call to this function.
+  */
+inline void update_time();
+
+/**
   * Determines the time since the device was powered on.
   *
   * @return the current time since power on in milliseconds
   */
-unsigned long system_timer_current_time();
+uint64_t system_timer_current_time();
+
+/**
+  * Determines the time since the device was powered on.
+  *
+  * @return the current time since power on in microseconds
+  */
+uint64_t system_timer_current_time_us();
 
 /**
   * Timer callback. Called from interrupt context, once per period.