Swiftpack.co - Package - randymarsh77/time

Time

A small utility to handle mach_absolute_time and timestamps.

license GitHub release SPM Build Status codecov.io codebeat badge

Usage

Create some time

let now = Time.Now

Get the mach value

let mach = now.machTimeStamp

Create some time with a mach value

_ = Time.FromMachTimeStamp(mach)

Add a second

let aSecondFromNow = now + Time.FromInterval(1, unit: .Seconds)

Subtract some micros

_ = aSecondFromNow - Time.FromInterval(1234, unit: .Microseconds)

Compare

_ = aSecondFromNow == now
_ = aSecondFromNow != now

Make a second

aSecond = aSecondFromNow - now

Github

link
Stars: 1

Dependencies

Used By

Total: 0

Releases

-

-