From 078edc158da7906ba72e7e6528e1a811e07270e7 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Mon, 29 Nov 2010 01:49:26 -0500 Subject: Finished converting the Arduino docs --- docs/source/lang/micros.rst | 65 +++++++++++++++------------------------------ 1 file changed, 21 insertions(+), 44 deletions(-) (limited to 'docs/source/lang/micros.rst') diff --git a/docs/source/lang/micros.rst b/docs/source/lang/micros.rst index 711c013..f12976b 100644 --- a/docs/source/lang/micros.rst +++ b/docs/source/lang/micros.rst @@ -1,69 +1,46 @@ +.. highlight:: cpp + .. _lang-micros: micros() ======== -Description ------------ - -Returns the number of microseconds since the Arduino board began -running the current program. This number will overflow (go back to -zero), after approximately 70 minutes. On 16 MHz Arduino boards -(e.g. Duemilanove and Nano), this function has a resolution of four -microseconds (i.e. the value returned is always a multiple of -four). On 8 MHz Arduino boards (e.g. the LilyPad), this function -has a resolution of eight microseconds. - - - -*Note*: there are 1,000 microseconds in a millisecond and 1,000,000 -microseconds in a second. +Returns the number of microseconds since the Maple board began running +the current program. This number will overflow (go back to zero), +after approximately 70 minutes. +.. note:: There are 1,000 microseconds in a millisecond, and 1,000,000 + microseconds in a second. +Library Documentation +--------------------- -Parameters ----------- - -None - - - -Returns -------- - -Number of microseconds since the program started (*unsigned long*) - - +.. doxygenfunction:: micros Example ------- :: - unsigned long time; + unsigned int time; - void setup(){ - Serial.begin(9600); + void setup() { } - void loop(){ - Serial.print("Time: "); + + void loop() { + SerialUSB.print("Time: "); time = micros(); - //prints time since program started - Serial.println(time); + // prints time since program started + SerialUSB.println(time); // wait a second so as not to send massive amounts of data delay(1000); } - - -See also +See Also -------- - -- `millis `_\ () -- `delay `_\ () -- `delayMicroseconds `_\ () - - +- :ref:`millis() ` +- :ref:`delay() ` +- :ref:`delayMicroseconds() ` .. include:: cc-attribution.txt -- cgit v1.2.3