Macaulay2 » Documentation
Packages » Macaulay2Doc :: currentTime
next | previous | forward | backward | up | index | toc

currentTime -- get the current time

Synopsis

Description

i1 : currentTime()

o1 = 1711037927

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

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

o2 = 54.2206334439397

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 = 2.64760132727653

o3 : RR (of precision 53)

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

i4 : run "date"
Thu Mar 21 12:18:47 PM EDT 2024

o4 = 0

For the programmer

The object currentTime is a compiled function.