Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Print Epoch Time in Different Languages

As you may know, tonight, at exactly 23:31:30 UTC, Epoch Time will reach 1234567890! Hurray!

One way of watching epoch time is by using Perl:

perl -le 'while(true){print time();sleep 1;}'

Can you do the same in another programming language?

like image 861
dogbane Avatar asked Feb 13 '09 11:02

dogbane


2 Answers

this site is in my favorites and has many answers for it

like image 172
chburd Avatar answered Sep 19 '22 17:09

chburd


python one-line:

python -c "while True: import time;print time.time();time.sleep(1)"
like image 29
Douglas Leeder Avatar answered Sep 21 '22 17:09

Douglas Leeder