Coap time

include chrono_time
include c_time
interpret id -> longbv[1][13][20] This file provides the interface to the time interface

interpret microseconds -> int #bv[32] #intbv[0][2147483647][32] #bv[55] interpret milliseconds -> int #bv[32] #intbv[0][2147483647][32] #bv[45]

object time_api = {
     instance c_timer : c_time(microseconds, milliseconds,seconds)
     instance chrono_timer : chrono_time(microseconds, milliseconds)
}

function sleep_start:milliseconds
relation slept

action milliseconds_to_microseconds(delay:milliseconds) returns (scaled:microseconds) = {
   <<<
    scaled = delay * 1000;
   >>>
}

action microseconds_to_milliseconds(delay:microseconds) returns (scaled:milliseconds) = {
   <<<
    scaled = delay/1000;
   >>>
}