Skip to content

Modern Chrono Instant FromTicks

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

Home › Date and Time (Chrono) › Chrono Date and Time › Instant.FromTicks

Instant.FromTicks

Creates a moment from 100 ns ticks since 0001-01-01, or Invalid if out of range.

Syntax

Instant.FromTicks
Instant.FromTicks( t, offMin )

Examples

#import "std/chrono"
using chrono

'' Ticks of 100 ns since 0001-01-01T00:00:00 UTC
dim as Instant i = Instant.FromTicks( 638914932000000000ll )

print i.Ticks                '' 638914932000000000
print i.IsValid              '' true

'' Out of range yields Invalid rather than wrapping
print Instant.FromTicks( -1 ).IsValid       '' false

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

Clone this wiki locally