Skip to content

Modern Chrono TimeSpan FromTicks

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

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

TimeSpan.FromTicks

Returns a duration of an exact number of 100 ns ticks.

Syntax

TimeSpan.FromTicks( int64 )

Examples

#import "std/chrono"
using chrono

'' The tick is 100 ns, and is the unit everything here measures in
print TimeSpan.FromTicks( 10000000ll ).TotalSeconds     '' 1

'' Exact, with no rounding step at all -- the other From* functions
'' convert a double and round half away from zero to get here
print TimeSpan.FromTicks( 1 ).Ticks              '' 1

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

Clone this wiki locally