Struct osc_address::AbsOscTime [] [src]

pub struct AbsOscTime { /* fields omitted */ }

OSC uses ntp time, i.e. absolute # of seconds since 1970 + a fraction of a second.

Methods

impl AbsOscTime
[src]

Create a OSC time from seconds and a fraction of a second. It is assumed that (sec, frac) != (0, 1) -- otherwise the time should be represented as OscTime::Now.

std::time::SystemTime -> AbsOscTime. Note that the OSC time can only represent dates out to year 2036, but SystemTime allows greater range. Hence, this returns None if the time is not representable.

Number of seconds since Jan 1, 1900.

Number of 1/2^32th fractional seconds to be added with the sec() field. e.g. 1000 represents 1000/2^32 seconds.

The number of whole seconds and fractional seconds, as a tuple.

Convert the OSC time tag into a type from the std::time library. This may fail because std::time only allows times >= unix epoch (1970), whereas OSC allows times >= 1900. Upon such failure, None is returned.

Trait Implementations

impl Copy for AbsOscTime
[src]

impl Clone for AbsOscTime
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for AbsOscTime
[src]

Formats the value using the given formatter.