unix/unix_mphal: Implement mp_hal_ticks_us().
Similar to existing mp_hal_ticks_ms().
This commit is contained in:
parent
5a2a4e9452
commit
b580958216
@ -191,3 +191,9 @@ mp_uint_t mp_hal_ticks_ms(void) {
|
||||
gettimeofday(&tv, NULL);
|
||||
return tv.tv_sec * 1000 + tv.tv_usec / 1000;
|
||||
}
|
||||
|
||||
mp_uint_t mp_hal_ticks_us(void) {
|
||||
struct timeval tv;
|
||||
gettimeofday(&tv, NULL);
|
||||
return tv.tv_sec * 1000000 + tv.tv_usec;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user