next | previous | forward | backward | up | top | index | toc | packages | Macaulay2 website
Macaulay2Doc :: currentTime

currentTime -- get the current time

Synopsis

Description

i1 : currentTime()

o1 = 1708802528

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

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

o2 = 54.1497964695703

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

o3 : RR (of precision 53)

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

i4 : run "date"
Sat Feb 24 19:22:08 UTC 2024

o4 = 0

For the programmer

The object currentTime is a compiled function.