45
\$\begingroup\$

Challenge

You must output the current time continuously (until cancelled by an interrupt), once every second, by any of the following means:

  • It must be in 24-hour or AM/PM format.
    • If it is the former, it must be spaced out with colons (i.e. 15:47:36).
    • If it is the latter, it must be spaced out with colons and have the AM/PM following (i.e. 3:47:36 PM)
  • It may be pulled from the internet.
  • It may be the system time.
  • It must output any naturally accessible form of output which supports text that you choose.
  • Output may have extra information aside of the time in it, but you must guarantee one, and only one, output of time per second.
  • The continuous output must be a second apart - if you choose to wait until the second changes between outputs, that is fine. If you wait a second between each output, that is perfectly acceptable, despite the eventual loss of accuracy.

Since this is a catalog, languages created after this challenge are allowed to compete. Note that there must be an interpreter so the submission can be tested. It is allowed (and even encouraged) to write this interpreter yourself for a previously unimplemented language. Other than that, all the standard rules of must be obeyed. Submissions in most languages will be scored in bytes in an appropriate preexisting encoding (usually UTF-8).

Catalog

The Stack Snippet at the bottom of this post generates the catalog from the answers a) as a list of shortest solution per language and b) as an overall leaderboard.

To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:

## Language Name, N bytes

where N is the size of your submission. If you improve your score, you can keep old scores in the headline, by striking them through. For instance:

## Ruby, <s>104</s> <s>101</s> 96 bytes

If there you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the last number in the header:

## Perl, 43 + 2 (-p flag) = 45 bytes

You can also make the language name a link which will then show up in the snippet:

## [><>](http://esolangs.org/wiki/Fish), 121 bytes

var QUESTION_ID=65020,OVERRIDE_USER=44713;function answersUrl(e){return"//api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"//api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="<h1>"+e.body.replace(OVERRIDE_REG,"")+"</h1>")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/<a/.test(o)&&(o=jQuery(o).text()),s[o]=s[o]||{lang:e.language,user:e.user,size:e.size,link:e.link}});var t=[];for(var o in s)s.hasOwnProperty(o)&&t.push(s[o]);t.sort(function(e,s){return e.lang>s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;
body{text-align:left!important}#answer-list,#language-list{padding:10px;float:left}table thead{font-weight:700}table td{padding:5px}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b"> <div id="answer-list"> <h2>Leaderboard</h2> <table class="answer-list"> <thead> <tr><td></td><td>Author</td><td>Language</td><td>Size</td></tr></thead> <tbody id="answers"> </tbody> </table> </div><div id="language-list"> <h2>Winners by Language</h2> <table class="language-list"> <thead> <tr><td>Language</td><td>User</td><td>Score</td></tr></thead> <tbody id="languages"> </tbody> </table> </div><table style="display: none"> <tbody id="answer-template"> <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr></tbody> </table> <table style="display: none"> <tbody id="language-template"> <tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr></tbody> </table>

\$\endgroup\$
25
  • 1
    \$\begingroup\$ @user81655 Yes, it can be any form of interrupt - don't worry about coding that bit. \$\endgroup\$ Commented Nov 27, 2015 at 23:01
  • 1
    \$\begingroup\$ @Vi. meta.codegolf.stackexchange.com/questions/6961/… \$\endgroup\$
    – user45941
    Commented Nov 28, 2015 at 6:21
  • 1
    \$\begingroup\$ @NBZ Yes, that's fine. \$\endgroup\$ Commented Jan 5, 2016 at 22:36
  • 1
    \$\begingroup\$ Warning: All sleep 1 based answer break rule 5: you must guarantee one, and only one, output of time per second. !! \$\endgroup\$ Commented May 17, 2016 at 23:03
  • 1
    \$\begingroup\$ F. Hauri: How so? Rule 6 says "If you wait a second between each output, that is fine as well." \$\endgroup\$
    – YetiCGN
    Commented Aug 26, 2016 at 22:03

95 Answers 95

2
\$\begingroup\$

Rebol, 25 bytes

forever[print now wait 1]

This prints day & time (24 hour HH:MM:SS). For an extra 5 bytes you can make it print just the time: forever[print now/time wait 1]

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Lol, is it said that I read this like house music? Print, now wait 1. Print, now wait 1. \$\endgroup\$ Commented May 20, 2016 at 9:35
2
\$\begingroup\$

Batch (Windows), 21 bytes

t.bat

echo %time%
timeout 1
t

Shows the time, delays for 1 second, then recursively calls itself. This is run as t.bat in the same directory.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ I count 43, but you also need to count the name. If you rename the file to A, then you can bring the score down to 38. \$\endgroup\$ Commented May 31, 2016 at 0:42
  • \$\begingroup\$ Welcome to PPCG! \$\endgroup\$ Commented May 31, 2016 at 4:09
2
\$\begingroup\$

MATL, 11 bytes

`Z'0XOD1Y.T

Try it here.

Explanation

`         % do...while loop
  Z'      %   get current date and time  
  0XO     %   string representation of date and time, with format 'dd-mmm-yyyy HH:MM:SS'
  D       %   convert to string and display           
  1Y.     %   pause for 1 second
  T       %   push "true" value as loop condition to create infinite loop
          % implicitly end loop
\$\endgroup\$
5
  • \$\begingroup\$ Why non competing? \$\endgroup\$ Commented Jul 31, 2016 at 16:43
  • \$\begingroup\$ @SocraticPhoenix Becuase the language is newer than the challenge. I've clarified that in the answer \$\endgroup\$
    – Luis Mendo
    Commented Jul 31, 2016 at 17:06
  • \$\begingroup\$ unless I'm mistaken, this is a catalog challenge, meaning you can post languages that are newer... \$\endgroup\$ Commented Jul 31, 2016 at 19:27
  • \$\begingroup\$ Yep, "Since this is a catalog, languages created after this challenge are allowed to compete" \$\endgroup\$ Commented Jul 31, 2016 at 19:28
  • \$\begingroup\$ @SocraticPhoenix Oh, thanks! I hadn't noticed. I'll remove the note then \$\endgroup\$
    – Luis Mendo
    Commented Jul 31, 2016 at 21:52
2
\$\begingroup\$

QBasic, 16 bytes

Shamelessly stole (and imporoved upon) Mauris' design:

CLS:?TIME$:RUN

Previous version: 24 bytes

EDIT: Only just saw that I don't have to SLEEP 1 if I continuously clear the screen and print the time. That's 4 bytes shorter:

DO:CLS:PRINT TIME$:LOOP

Previous entry (28 bytes)

DO:PRINT TIME$:SLEEP 1:LOOP

Nothing fancy, not too shabby.

\$\endgroup\$
2
\$\begingroup\$

Pascal, 144 B

This program requires a processor complying to the ISO standard 10206 “Extended Pascal”, e. g. the GNU Pascal Compiler (GPC). It’s doing a busy wait until the time changes. The second line of the entire output will probably be printed in significantly less than a 1 second interval.

program t(output);var t:timeStamp;s:string(8);begin s:='';repeat getTimeStamp(t);if s<>time(t)then begin s:=time(t);writeLn(s)end until 6=9 end.

The code does not check timeStamp.timeValid, so on a system without a clock this program will print just a single line representing midnight, getTimeStamp’s default value if timeStamp.timeValid is set to false.

The return value of time is implementation-defined. It may be in an AM/PM format, military time, or something else. Thus it’s not guaranteed that the challenge’s specifications are met. At any rate, the GPC’s implementation returns something in the style of 22:00:42. This fits into a string(8). A different Pascal implementation may require more characters in order to detect a change in time.

Also, if you don’t mind a preceding empty line, you can use this 134 B program:

program t(output);var x:timeStamp;s:string(8);begin s:='';repeat getTimeStamp(x);if s<>time(x)then writeLn(s);s:=time(x)until 6=9 end.
\$\endgroup\$
1
\$\begingroup\$

TI-BASIC, 29 bytes

While 1
Output(1,1,getTimeStr(24)+":
Output(1,7,sum(getTime,3
End

TI-BASIC has a built-in getTimeStr, but it doesn't display seconds! How to fix this? Just display the seconds over the empty space after the minutes. (It would be much easier if there were a way to convert numbers to strings.)

Outputs in 24-hour mode.

\$\endgroup\$
2
  • \$\begingroup\$ I count 65 bytes there... how do you get 29? \$\endgroup\$
    – Fozzedout
    Commented Dec 1, 2015 at 10:08
  • 1
    \$\begingroup\$ @Fozzedout TI-BASIC uses a tokenized encoding of one or two bytes per token. \$\endgroup\$
    – Adám
    Commented Feb 1, 2016 at 19:18
1
\$\begingroup\$

C#, 129 125 bytes

using System;using System.Threading;class P{static void Main(){for(;;){Console.WriteLine(DateTime.Now);Thread.Sleep(1000);}}}

Ungolfed:

using System;
using System.Threading;

class Program
{
    static void Main()
    {
        for (;;)
        {
            Console.WriteLine(DateTime.Now);
            Thread.Sleep(1000);
        }
    }
}
\$\endgroup\$
4
  • 1
    \$\begingroup\$ I don't know C# but can't you do for(;;) instead of while(true)? \$\endgroup\$
    – Blue
    Commented Nov 30, 2015 at 9:45
  • \$\begingroup\$ Updated, thanks @muddyfish \$\endgroup\$
    – gamesmad
    Commented Nov 30, 2015 at 10:13
  • 1
    \$\begingroup\$ Can you do 1e3 over 1000? (I don't know C# either.) \$\endgroup\$ Commented Nov 30, 2015 at 10:15
  • \$\begingroup\$ Thread.Sleep accepts either int or TimeSpan. You can do Thread.Sleep((int)1e3) but that's longer unfortunately. \$\endgroup\$
    – gamesmad
    Commented Nov 30, 2015 at 10:18
1
\$\begingroup\$

PHP, 24 bytes

for(;;)echo date("\rr");

\r clears the current line before printing the date/time using the r flag. Therefor it doesn't have to wait or delay the output for a second. Also the cursor is always positioned behind the output, which would be different for r\r where it would overlay the first character of the output.

\$\endgroup\$
6
  • \$\begingroup\$ "You must output the current time continuously (until cancelled by an interrupt), once every second" ... not every millisecond. \$\endgroup\$
    – user19214
    Commented Nov 30, 2015 at 15:43
  • 1
    \$\begingroup\$ @yeti See the OP's current last comment on the question: "If it's only one visible output per second, then that should be fine.". \$\endgroup\$ Commented Nov 30, 2015 at 15:46
  • 2
    \$\begingroup\$ Changing the rules in comments is not a good idea... he better should update the original text instead... :-( \$\endgroup\$
    – user19214
    Commented Nov 30, 2015 at 15:57
  • \$\begingroup\$ Shouldn't PHP code always include the short open tag or add bytes for using the -r switch? Otherwise, this script will just print the source code. \$\endgroup\$
    – YetiCGN
    Commented Aug 26, 2016 at 22:13
  • 1
    \$\begingroup\$ @YetiCGN It's accepted throughout this site to not include the PHP opening tag in the byte count. Here's a discussion about it that also links to a few related posts. \$\endgroup\$ Commented Aug 26, 2016 at 22:20
1
\$\begingroup\$

AppleScript, 112 93 45 bytes

repeat
delay 1
log(do shell script"date")
end

This repeats in a loop, does the bash script date, gets its returned string, and outputs it to the Messages pane. Why I didn't do this at first, I'll never know.

Using Node:

Let's have a odd useless combination, shall we?

This was inspired by my Vitsy answer, which also uses JS to get the date.

tell app"System Events"
tell app"Terminal"to activate
keystroke"node
"
repeat
delay 1
keystroke"Date()
"
end
end

What I do here is I tell the System Events application to get terminal as the front window, then enter node with the terminal by telling System Events to simulate keystrokes of n, o, d, e, followed by a newline. It then enters a loop in which it delays for a second, tells node to do Date() by the same method, then going back to the top of the loop.

This answer is mostly to demonstrate the odd things that Applescript allows you to do.

\$\endgroup\$
2
  • \$\begingroup\$ sleep 1 based answer break rule 5: you must guarantee one, and only one, output of time per second!! \$\endgroup\$ Commented May 18, 2016 at 6:41
  • \$\begingroup\$ @F.Hauri I've seen you posting this on most things in this question, but read rule 6 carefully as to why this is not always the case. ;) \$\endgroup\$ Commented May 18, 2016 at 6:44
1
\$\begingroup\$

Unix Shell + procps, 12 bytes

procps is a package providing CLI utils for browsing procfs, a virtual filesystem generated by the kernel to provide information about processes.

The watch command reruns a command every on an interval, that defaults to 2. Set it to 1, and run ., and voilá, watch suppresses stderr.

watch -n1 .

The time is in the upper right.


incidentally, watch is very handy for spying on the progress of a lengthy dd or cp.

\$\endgroup\$
1
  • \$\begingroup\$ I think you meant : (a colon). A single . is shorthand for source. source without any arguments should complain about missing arguments. Also, I think ‑‑precise/‑p would be adequate here. “Incidentally” dd has status=progress so a periodic pkill ‑USR1 '^dd$' isn’t necessary. I’m not sure how you combine watch and cp. \$\endgroup\$ Commented Nov 3, 2022 at 23:06
1
\$\begingroup\$

Factor, 43 bytes

[ [ t ] [ now "%c" strftime print ] while ]

An anoymous function. Use it like ~quotation~ call.

\$\endgroup\$
1
  • \$\begingroup\$ I thought it was supposed to output the time once per second. This outputs as often as possible. \$\endgroup\$
    – chunes
    Commented Nov 4, 2022 at 0:05
1
\$\begingroup\$

Pylongolf, 11 bytes

>}~.1000w.<

}~ pushes the current time into the stack and then prints it.
. the dots reset the stack.
1000w pushes 1000 into the stack and then waits that time.

\$\endgroup\$
2
  • \$\begingroup\$ This not seems to output the time continuously, once per second. \$\endgroup\$
    – manatwork
    Commented Mar 30, 2016 at 16:48
  • \$\begingroup\$ Fixed the problem! \$\endgroup\$
    – user47018
    Commented Mar 30, 2016 at 17:12
1
\$\begingroup\$

Jelly, 8 bytes

7ŒTṄœS1ß

Try it online!

How it works

7ŒTṄœS1ß  Main link. No arguments.

7         Yield 7 (or 111 in binary).
 ŒT       Time; return hours, minutes and seconds (lower three bits).
   Ṅ      Print, followed by a linefeed.
      1   Yield 1.
    œS    Sleep for 1 second, return the time.
       ß  Call the main link recursively.
\$\endgroup\$
1
\$\begingroup\$

Python, 53 bytes

This one prints the date and year as well as the time, so I don't know if it's allowed.

import time
while 1:print(time.ctime());time.sleep(1)

EDIT: J.F.Sebastian made a shorter one.

\$\endgroup\$
1
\$\begingroup\$

Scratch, 15 bytes

Scratch Script
(scoring used)
This script is essentially what it says. It joins the hour value, then a colon, then the minute value, then a colon, then the second value. The downside is that Scratch reads 01 as 1, so it might not be valid without making the script longer.

\$\endgroup\$
2
  • 1
    \$\begingroup\$ Hello, and welcome to PPCG! According to Meta, that is 15 bytes, one for each block, and one for each character of text. \$\endgroup\$ Commented May 18, 2016 at 20:05
  • \$\begingroup\$ Thanks for pointing that out, I linked the meta post in question for clarity. \$\endgroup\$ Commented May 18, 2016 at 22:54
1
\$\begingroup\$

Lua, 51 Bytes

Since the previous owner of this answer in 56 Bytes doesn't update anymore when suggested improvments, here's a 51 Bytes solution heavily based on his:

v=1::a::v=os.date'%c'l=v~=l and print(v)or v goto a
\$\endgroup\$
1
\$\begingroup\$

C#, 102 bytes

using System;class P{static void Main(){for(var s="";;)if(s!=(s=DateTime.Now+"\n"))Console.Write(s);}}

An infinite loop that prints whenever the time changes. Default precision for C# date printing is to the second, so that works out nicely.

\$\endgroup\$
1
\$\begingroup\$

Nim, 55 54 bytes

import os,times
while on:echo getClockStr();sleep 1000

on is an alias for true. Prints the result of the times module's getClockStr proc, which formats the time nicely in 24-hour format, then uses the os module's sleep proc to sleep a second.

\$\endgroup\$
1
\$\begingroup\$

Tellurium, 8 bytes

[i|t^¨]

The code that is after the | and before the ] is run forever (i).

It changes the value of the current cell to the current time (t), outputs the current cell's value using ^, and waits for 1 second (¨) before continuing.

\$\endgroup\$
2
  • \$\begingroup\$ "Since this is a catalog, languages created after this challenge are allowed to compete." Hey, what are you waiting for? \$\endgroup\$
    – user48538
    Commented May 20, 2016 at 9:41
  • \$\begingroup\$ @zyabin101 Fixed that! Thanks :) \$\endgroup\$
    – m654
    Commented May 20, 2016 at 11:36
1
\$\begingroup\$

Mathematica, 27 21 bytes

With 2 bytes saved thanks to Xavier.

Dynamic@{Now,Clock[]}
\$\endgroup\$
1
  • \$\begingroup\$ 25 bytes with Dynamic@{Now,Clock@{1,2}}, and 21 with: Dynamic@{Now,Clock[]}. \$\endgroup\$
    – user48818
    Commented Aug 27, 2016 at 14:59
1
\$\begingroup\$

Clojure, 140 bytes

(loop[l 0](let[c(System/nanoTime)](recur(if(>=(- c l)1e3)(do(println(.format(java.text.SimpleDateFormat."h:m:s a")(java.util.Date.)))c)l))))

Full program. Loops continually; keeping track of the last time it printed. If 1000ms have passed, it prints, then resets the time.

Java interop really bloats this up, but not much can be done about that.

Ungolfed:

(defn current-time []
  (loop [last-ns 0]
    (let [current-time (System/nanoTime)]
      (recur
        (if (>= (- current-time last-ns) 1e3)
          (do
            (println (.format (java.text.SimpleDateFormat. "h:m:s a") (java.util.Date.)))
            current-time)
          last-ns)))))

Using sleep (which seems to be of questionable validity), 100 bytes

(while[](Thread/sleep 1e3)(println(.format(java.text.SimpleDateFormat."h:m:s a")(java.util.Date.))))

Ungolfed:

(defn current-time []
  (while []
    (Thread/sleep 1e3)
    (println (.format (java.text.SimpleDateFormat. "h:m:s a") (java.util.Date.)))))
\$\endgroup\$
1
\$\begingroup\$

Fourier, 46 20 bytes

This is a fairly simple program which loops infinitely, using the newly added date functions, delay function and clear screen function.

This does not show a leading zero on the minutes or the seconds value when either are less than ten.

(@2do58a1do58a0do1;)

Try it online!

Note: this program will not work on http://fourier.tryitonline.net due to differences in the way interpreters work.

\$\endgroup\$
1
\$\begingroup\$

QBIC, 6 bytes (nc)

{_C?_d

QBIC is newer than this challenge. In fact, this challenge is the reason QBIC has a _C command (for CLS - Clear the screen) and the _d/_D commands (for TIME$ and DATE$ resp).

Explanation

{        Start infinite loop
 _C      Clear screen
   ?     PRINT
    _d   TIME$ (which holds the system's time in QBasic)
\$\endgroup\$
1
\$\begingroup\$

MOO, 46 bytes

while(!suspend(!player:tell(ctime())))endwhile

Sleeps for one second between outputs, regardless of execution time (and it's impossible to know sub-second timings anyway

\$\endgroup\$
1
\$\begingroup\$

Factor, 29 bytes

[ now hh:mm:ss nl ] 1e9 every

Normally you'd give every a duration for more readability: [ ... ] 1 seconds every but if you just give it a number, it'll interpret it as nanoseconds.

\$\endgroup\$
1
\$\begingroup\$

tcl, 67

while 1 {puts [clock format [clock seconds] -format %T];after 1000}

can be tested on: http://tpcg.io/_MQDV24

\$\endgroup\$
0
\$\begingroup\$

PHP, 36 34 bytes

a:echo'
'.date(r);sleep(1);goto a;

The line break can be \n but it's nicer to convert the script to the old Macintosh line format and make it \r, then the time is neatly updated on the same line.

Updates:

  1. Removed short open tag as per this meta answer
\$\endgroup\$
1
  • \$\begingroup\$ for(;;sleep(1))... saves three bytes. echo date("\nr"); is not shorter, but looks cleaner imo. \$\endgroup\$
    – Titus
    Commented Jan 7, 2017 at 11:42
0
\$\begingroup\$

05AB1E, 13 bytes

[žažbžc)':ý,w

Should work, but I don't have Python 3, so I can't test.

\$\endgroup\$
0
\$\begingroup\$

Elixir, 95 bytes

def f, do: 1000|>Stream.interval|>Enum.each(&(&1&&DateTime.utc_now|>DateTime.to_time|>IO.puts))
\$\endgroup\$
0
\$\begingroup\$

*><>, 16 bytes

'::'hnomnosnaoaS

000webhostapp interpreter.

Note: it sometimes skips a second (e.g. 12:34:6 → 12:34:8), because you can't wait exactly a second with total accuracy. Unfortunately there isn't any way to fix this.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.