Skip to main content
2 of 5
added 228 characters in body
primo
  • 33.5k
  • 5
  • 61
  • 139

Perl, Command Line, 24 bytes

sleep(say)while$_=gmtime

This must be run from the command line, as perl -E'sleep(say)while$_=gmtime'. The date will be output along with the time, which seems to be allowed.


Perl, 37 bytes

sleep print/(\S{8})/,$/while$_=gmtime

In a scalar context, gmtime will return a string similar to Sat Nov 28 10:23:05 2015. The time is extracted (the only stretch of 8 non-whitespace characters), and the result from print, always 1, is used as the parameter for sleep.

primo
  • 33.5k
  • 5
  • 61
  • 139