mirror of
https://github.com/micropython/micropython.git
synced 2025-12-13 08:20:13 +01:00
alif/mphalport: Implement mp_hal_time_ns.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -167,7 +167,9 @@ void mp_hal_delay_ms(mp_uint_t ms) {
|
||||
}
|
||||
|
||||
uint64_t mp_hal_time_ns(void) {
|
||||
return 0;
|
||||
uint32_t microseconds;
|
||||
uint32_t s = mp_hal_time_get(µseconds);
|
||||
return (uint64_t)s * 1000000000ULL + (uint64_t)microseconds * 1000ULL;
|
||||
}
|
||||
|
||||
void mp_hal_pin_config(const machine_pin_obj_t *pin, uint32_t mode,
|
||||
|
||||
Reference in New Issue
Block a user