Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » system facilities » currentTime
next | previous | forward | backward | up | index | toc

currentTime -- get the current time

Description

i1 : currentTime()

o1 = 1749651246

We can compute, roughly, how many years ago the epoch began as follows.

i2 : currentTime() /( (365 + 97./400) * 24 * 60 * 60 )

o2 = 55.44424081261081

o2 : RR (of precision 53)

We can also compute how many months account for the fractional part of that number.

i3 : 12 * (oo - floor oo)

o3 = 5.330889751329693

o3 : RR (of precision 53)

Compare that to the current date, available from a standard Unix command.

i4 : run "date"
Wed Jun 11 14:14:06 UTC 2025

o4 = 0

For the programmer

The object currentTime is a compiled function.


The source of this document is in /build/reproducible-path/macaulay2-1.25.06+ds/M2/Macaulay2/packages/Macaulay2Doc/ov_system.m2:1849:0.