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.
millis.cpp
00001 #include "mbed.h" 00002 #include "millis.h" 00003 00004 static volatile uint32_t millisValue = 0; 00005 00006 static Ticker ticker; 00007 00008 void millisTicker () 00009 { 00010 millisValue ++; 00011 } 00012 00013 uint32_t millis () 00014 { 00015 return millisValue; 00016 } 00017 00018 void setMillis (uint32_t theValue) { 00019 millisValue = theValue; 00020 } 00021 00022 void startMillis () { 00023 ticker.attach (millisTicker, 0.001); 00024 } 00025 00026 void stopMillis () { 00027 ticker.detach (); 00028 } 00029
Generated on Sun Aug 7 2022 17:01:46 by
1.7.2