API Reference › Time › Time.since
method

Time.since

Time.since(past) -> int

The number of seconds elapsed from the DateTime past to now (Time.now() - past). Because it reads the wall clock it is non-deterministic — use it for offline-progress and "time away" checks, never inside the lockstep simulation. The result is a Duration in seconds, ready for the Duration.as_* readers.

Example

program Demo {
  handler Step phase Update {
    let last_seen = DateTime.from(2026, 8, 30, 9, 0, 0)
    let away = Time.since(last_seen)
    let hours_away = Duration.as_hours(away)
  }
}
← All symbols