Skip to content

Modern Chrono LocalTime Microsecond

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › Date and Time (Chrono) › Chrono Date and Time › LocalTime.Microsecond

LocalTime.Microsecond

Returns the microseconds within the second, the milliseconds included.

Syntax

LocalTime.Microsecond

Examples

#import "std/chrono"
using chrono

'' The constructor stops at MILLISECONDS -- there is no microsecond
'' parameter, so finer values are built from ticks
dim as LocalTime t = LocalTime.FromTicks( _
    LocalTime( 14, 30, 5, 123 ).Ticks + 456 * DT_TICKS_PER_MICROSECOND )

print t.Millisecond          '' 123
print t.Microsecond          '' 123456

'' NOTE WHAT THAT NUMBER IS. Millisecond counts within the SECOND and so
'' does Microsecond -- it is 123456, not the 456 left over after the
'' milliseconds. Both are `ticks \ unit mod (units per second)`.
'' For the leftover, take Microsecond mod 1000.
print t.Microsecond mod 1000 '' 456

'' The tick below it, 100 ns, is the finest unit the type carries.

Library: Chrono Date and Time
Category: Date and Time (Chrono)
Documented under: The Members

Clone this wiki locally