[Question]
  [
# Challenge
Your task is to write a program which, once a second (including immediately when your program is started), prints the elapsed time from the time your program was started.
# Rules
* Time must be printed in `hh:mm:ss` format. (leading zeros for single-digit values)
* The time stamps must be separated by CR, LF, or CRLF. (no leading whitespace)
* A new time must appear every second. (stdout cannot be buffered for a second)
* The behavior of the program if it is run past 23:59:59 is undefined.
* You may use `sleep(1)` even if a specific second may be skipped whenever the overhead to print, calculate, loop, etc. accumulates to a second.
Example output:
```
00:00:00
00:00:01
00:00:02
00:00:04
00:00:05
⋮
```
Note that `00:00:03` is missing here due to processing overhead. The actual skipped values (if any) are of course dependent on implementation and/or system.
Reference implementation in C: (POSIX-compatible systems only)
```
#include <unistd.h> // sleep()
#include <tgmath.h>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#ifndef __STDC_IEC_559__
#error "unsupported double"
#endif
static_assert(sizeof(double) == 8, "double must have double precision");
#define MAX_PRECISE_DOUBLE ((double)(1ULL << 52))
int main(void) {
    time_t start = time(NULL);
    if (start == (time_t)-1) return EXIT_FAILURE;
    while (1) {
        time_t now = time(NULL);
        if (now == (time_t)-1) return EXIT_FAILURE;
        double diff = difftime(now, start);
        if (isnan(diff) || diff < 0) return EXIT_FAILURE;
        if (diff > MAX_PRECISE_DOUBLE) return EXIT_FAILURE;
        unsigned long long seconds = diff;
        unsigned long long h = seconds / 3600;
        seconds %= 3600;
        unsigned long long m = seconds / 60;
        seconds %= 60;
        unsigned long long s = seconds;
        (void)printf("\r%02llu:%02llu:%02llu", h, m, s);
        (void)fflush(stdout);
        (void)sleep(1);
    }
}
```
# Winning criteria
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), shortest code in bytes win!
  
[Answer]
# [Operation Flashpoint](https://en.wikipedia.org/wiki/Operation_Flashpoint:_Cold_War_Crisis) scripting language, ~~174~~ 171 bytes
```
s=""
#l
t=_time
t=t-t%1
a=t%60
c=(t-a)/60
b=c%60
c=(c-b)/60
d=""
e=d
f=d
?a<10:d=0
?b<10:e=0
?c<10:f=0
s=s+format["%1%2:%3%4:%5%6\n",f,c,e,b,d,a]
hint s
@t+1<_time
goto"l"
```
**In action:**
[![](https://i.stack.imgur.com/NzVes.jpg)](https://i.stack.imgur.com/NzVes.jpg)
[![](https://i.stack.imgur.com/H8pIR.gif)](https://i.stack.imgur.com/H8pIR.gif)
**158 bytes, if the previous time is overwritten by the next time:**
```
#l
t=_time
t=t-t%1
a=t%60
c=(t-a)/60
b=c%60
c=(c-b)/60
d=""
e=d
f=d
?a<10:d=0
?b<10:e=0
?c<10:f=0
hint format["%1%2:%3%4:%5%6",f,c,e,b,d,a]
@t+1<_time
goto"l"
```
Technically, no carriage return is used, so I'm not sure if this version confines to the rules.
[Answer]
# [Bash](https://www.gnu.org/software/bash/) + coreutils, ~~28~~ 26 bytes
```
date -s0|yes date +c%T|sh
```
The unprintable character between `+` and `%` is an *ESC* byte.
**This sets the system time to 00:00:00** and thus requires root privileges. It also assumes that the timezone is UTC and that no other processes will interfere with the system clock.
Each new timing resets the terminal, thus overwriting the previous one.
---
# [Bash](https://www.gnu.org/software/bash/) + coreutils, ~~38~~ 29 bytes
```
date -s0|yes date +%T|sh|uniq
```
The same restrictions as before apply. Each new timing is shown on a new line.
[Answer]
# [MATL](https://github.com/lmendo/MATL), ~~17~~ 16 bytes
```
`Z`12L/13XOD1Y.T
```
Try it at [**MATL Online!**](http://matl.io/?code=%60Z%6012L%2F13XOD1Y.T&inputs=&version=20.4.2)
### How it works
```
`         % Do...while loop
  Z`      %   Push seconds elapsed since start of program
  12L     %   Push 86400 (predefined literal)
  /       %   Divide. This transforms seconds into days
  13XO    %   Convert to date string with format 13, which is 'HH:MM:SS'
  D       %   Display
  1Y.     %   Pause for 1 second
  T       %   True. Used as loop condition for infinite loop
          % End loop (implicit)
```
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), 51 bytes
Full program body.
```
s←⎕AI
1↓∊':'@1∘⍕¨100+3↑0 60 60 1E3⊤3⊃⎕AI-s
⎕DL 1
→2
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///qKM9uCS/oDyxJDnjf/GjtgmP@qY6enIZPmqb/KijS91K3cHwUceMR71TD60wNDDQNn7UNtFAwQyMDF2NH3UtAeJmsB7dYi4g7eKjYMj1qG2SEcjk/3CjAQ "APL (Dyalog Unicode) – Try It Online") (Press Ctrl+Enter to start, and again to stop.)
`⎕AI` **A**ccount **I**nformation (user ID, compute time, connect time, keying time)
`s←` assign to `s` (for **s**tart time)  
`⎕AI-s` subtract `s` from `⎕AI`
`3⊃` pick the third element (connect time in milliseconds)  
`0 60 60 1E3⊤` convert to this mixed-radix  
`3↑` take the first 3 (drops the milliseconds)  
`100+` one hundred added to each (to pad zeros)  
`':'@1∘⍕¨` amend with a colon at the first character of the string representation of each  
`∊` **ϵ**nlist (flatten)  
`1↓` drop the first colon (and implicitly print to stdout)
`⎕DL 1` **D**e**l**ay one second
`→2` go to line number two
[Answer]
# [R](https://www.r-project.org/), ~~59~~ 44 bytes
`F` in R defaults to `FALSE`, but it's a regular variable and can be redefined. When used in arithmetic, `FALSE` is coerced to `0`. Asking for `F+1` therefore returns `1`. We assign `F` to be `F+1`, format it nicely, print, and wait for one second. Continues indefinitely.
```
repeat{print(hms::hms(F<-F+1))
Sys.sleep(1)}
```
Doesn't work on TIO (due to lack of the `hms` package), but here's a sample output from my machine:
```
00:00:00
00:00:01
00:00:02
00:00:03
00:00:04
00:00:05
00:00:06
00:00:07
00:00:08
00:00:09
00:00:10
00:00:11
00:00:12
00:00:13
```
[Answer]
# [bash](https://www.gnu.org/software/bash/) + sleep + date, ~~also 50~~ ~~49~~ ~~47~~ ~~46~~ ~~45~~ 41 bytes
```
while date -ud@$[s++] +%T;do sleep 1;done
```
To take a lap time, quickly hit ^C, run this and then rerun the above:
```
laps=("${laps[@]}" $s) ; echo ${laps[-1]}
```
To reset:
```
s=0; unset laps
```
The $[s++] syntax appears to still work, but is no longer (AFAICS) documented in the `bash` man page. And it's still a byte shorter than using the for((...)) loop, once I removed the quotes around it.
[Answer]
# [Swift](https://swift.org), 144 bytes
```
import Foundation
let s=Date()
while 1>0{let d=Int(-s.timeIntervalSinceNow)
print(String(format:"%02d:%02d:%02d",d/3600,d/60%60,d%60))
sleep(1)}
```
## Explanation
```
import Foundation                       // Import `Date` and `sleep()`
let s = Date()                          // Get the time at the start of the program
while 1 > 0 {                           // While 1 > 0 (forever):
  let d = Int(-s.timeIntervalSinceNow)  //   Calculate time difference
  print(String(format:"%02d:%02d:%02d", //   Print the time
      d/3600,d/60%60,d%60))
  sleep(1)                              //   Sleep one second
}
```
[Answer]
# JavaScript (ES6), 99 bytes
```
f=_=>console.log(new Date(new Date-d).toUTCString().slice(17,25))
f(d=Date.now(setInterval(f,1e3)))
```
[Answer]
# [Matlab](https://www.mathworks.com/products/matlab.html) (R2016b), 50 bytes
```
t=now;while 1,disp(datestr(now-t,13)),pause(1),end
```
Explanation:
```
t=now; % Stores the current time
while 1 % Loops forever
    disp(datestr(now-t,13)) % Computes the difference since the program started
    % And prints with format 13 ('HH:MM:SS') - this may change between versions
    pause(1) % Waits one second
end
```
Alternate version (50 bytes too :P):
```
now;while 1,disp(datestr(now-ans,13)),pause(1),end
```
[Answer]
# [Julia 0.6](http://julialang.org/), ~~75~~ 68 bytes
```
for h=0:23,m=0:59,s=0:59;@printf "%02i:%02i:%02i
" h m s;sleep(1)end
```
[Try it online!](https://tio.run/##yyrNyUw0@/8/Lb9IIcPWwMrIWCcXSJla6hSDKWuHgqLMvJI0BSVVA6NMKzjBpaSQoZCrUGxdnJOaWqBhqJmal/L/PwA "Julia 0.6 – Try It Online")
With sleep(1) allowed, simple nested for-loops are shorter than using Julias built-in time handling methods.
**Old solution without sleep(1) using DateTime**
```
t=now()-DateTime(0);Timer(x->println(Dates.format(now()-t,"HH:MM:SS")),0,1)
```
`t` is the amount of time passed from 'day 0' to when the program is started.
`now()-t` is a *moment in time*, which is then formatted using `Dates.format()`.
`t0=now(); ...; now()-t0` would yield a *time difference*, that cannot be used with `Dates.format()`.
The timing itself is trivial with the build-in `Timer`.
[Answer]
# [Python 2](https://docs.python.org/2/), 85 bytes
```
import time
t=0
while 1:print(":%02d"*3)[1:]%(t/3600,t/60%60,t%60);time.sleep(1);t+=1
```
# Credits
* Reduced from 89 bytes to 88 by [wnnmaw](https://codegolf.stackexchange.com/users/30170/wnnmaw)
* Reduced from 88 bytes to 85 by [Erik the Outgolfer](https://codegolf.stackexchange.com/users/41024/erik-the-outgolfer)
[Answer]
# JavaScript (ES6), 88 bytes
```
f=_=>console.log(new Date(i++*1e3).toUTCString().slice(17,25))
f(i=0,setInterval(f,1e3))
```
Essentially the same approach as [@darrylyeo's answer](https://codegolf.stackexchange.com/a/151800/72685), but works for all timezones and uses a slightly different way to get to 0.
[Edit] Darryl's answer has been fixed. This is still shorter, though.
[Answer]
# [><>](https://esolangs.org/wiki/Fish), 82 + 7 = 89 bytes
```
0\!
:/+1oan~?=3ln?$0(a:o":"n~?=4ln?$0(a:ro":"n~?=5ln?$0(a:,*a6-}:%*a6:,*a6-}:%*a6:
```
[Try it online!](https://tio.run/##S8sszvj/3yBGkctKX9swPzGvzt7WOCfPXsVAI9EqX8lKCSRgAhMogomYwkR0tBLNdGutVIEUCvv///@6JXoGhkamAA "><> – Try It Online")
+7 bytes for using the flag `-t.0125` to make the each instruction take 1/80th of a second. Each loop has 80 instructions, making each loop one second long. Because of computation time, this is actually longer in practice.
I actually had to buffer this all the way up to 100 until I saw @Not A Tree's [answer](https://codegolf.stackexchange.com/a/152144/76162) which had 7 byte better way than mine to generate the hours and minutes, trimming it below 80. They also inspired the use of `\/` which are executed twice per loop.
### How It Works
```
0\...
./...
Initialises the stack with a 0 to represent the time
0\!
:/....................................................,*a6-}:%*a6:,*a6-}:%*a6:
Puts the hours, minutes and seconds in the stack
0\!
:/....n~?=3ln?$0(a:o":"n~?=4ln?$0(a:ro":"n~?=5ln?$0(a:...
Print out the hours, minutes, seconds separated by colons. 
If the number is below 0, print a leading 0. 
If the number is not, then there is an extra 0 on the stack, which is popped.
0\!
./+1oa...
Print a newline and increment the counter
And restart the loop
```
### Bonus:
A one line version of the same size, 80 + 9 bytes:
```
0::6a*%:}-6a*,:6a*%:}-6a*,:a(0$?nl5=?~n":"or:a(0$?nl4=?~n":"o:a(0$?nl3=?~nao1+>!
```
This uses the `-a` flag to add ticks for skipped instructions.
[Answer]
## PHP 4+, ~~70~~ 64 bytes
```
$x=time();while(1){sleep(1);echo date('H:i:s',time()-$x)."\n";}
```
## PHP 5.3+, ~~69~~ 63 bytes
```
$x=time();a:sleep(1);echo date('H:i:s',time()-$x)."\n";goto a;
```
[Answer]
# [Python 3](https://docs.python.org/3/), 112 bytes
Assuming using 1-second delays is ok, even if it (rarely) might skip a second.
```
from time import*;a=0
while 1:d=divmod;m,s=d(a,60);print(":".join(f"{k:02d}"for k in(*d(m,60),s)));a+=1;sleep(1)
```
[Answer]
# VBA, 90
```
t=0:while(1):?format(t,"hh:mm:ss"):t=t+timeserial(0,0,1):q=timer:while q-timer<1:wend:wend
```
run in immediate window:expected failure point somewhere around 23 million years (floating point resolution fails ~8.5e9 days)
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 23 bytes
```
:⁽½c,60;%60d⁵j”:ṄœS1ṛ‘ß
```
[Try it online!](https://tio.run/##AS8A0P9qZWxsef//OuKBvcK9Yyw2MDslNjBk4oG1auKAnTrhuYTFk1Mx4bmb4oCYw5///w "Jelly – Try It Online")
[Answer]
# [AWK](https://www.gnu.org/software/gawk/manual/gawk.html), ~~110~~ ~~87~~ 86 bytes
```
BEGIN{for(;;i++){printf("%02d:%02d:%02d\n",i/3600%60,i/60%60,i%60);system("sleep 1")}}
```
Does not work in TIO.
[Answer]
# [APL (Dyalog)](https://www.dyalog.com/), 37 bytes
```
{∇⍵+×⎕DL 1⊣⎕←1↓∊':'@1∘⍕¨100+⍵⊤⍨3⌿60}0
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///v/pRR/uj3q3ah6c/6pvq4qNg@KhrMZD1qG2C4aO2yY86utSt1B0MH3XMeNQ79dAKQwMDbaDqR11LHvWuMH7Us9/MoNbg/38A "APL (Dyalog Unicode) – Try It Online")
Full program.
Pretty similar to Adám's answer, however independently written and uses a non-`⎕AI`-based approach.
[Answer]
# [Bash](https://www.gnu.org/software/bash/) + coreutils + GNU date, 50 bytes
```
o=`date +"%s"`;yes date +%X -ud\"-$o sec\"|sh|uniq
```
Inspired by @Dennis, this solution doesn't require the time to be changed.
It store stores the initial offset from now to the UNIX epoch (1 Jan 1970 00:00:00 UTC), in 'o', and then displays [-ud options] (the current time - offset), in UTC date, but only [+%X option] HH:MM:SS. This should work in countries where the current time-zone isn't UTC.
[Answer]
# [Clean](https://clean.cs.ru.nl), ~~173~~ ~~172~~ 168 bytes
```
import StdEnv,System.Time
$n i#i=(i/60^n)rem 60
=(i/10,i rem 10)
f i w#(Clock j,w)=clock w
#j=j/1000
|j>i=[j:f j w]=f i w
Start w=[($2i,':',$1i,':',$0i,'
')\\i<-f -1 w]
```
This one only works under the Windows Clean bundles.
Add 3 bytes if you want it to work under Linux, as Clean's `CLK_PER_TICK :== 1000000` on \*nix. If you want it to be cross-platform, add 8 bytes instead, as you need to use `CLK_PER_TICK` instead of the value it's set to. (*TIO link is larger due to above*)
[Try it online!](https://tio.run/##LY1Bi8IwFITv@RUPWmgLqaZ78CAbL@pB8LDQvekuZGMiLyaptHGD4G83W8vOZeaDGUZaJXxy3elmFTiBPqG7dn2ANpy2/pe29yEoN/tEp0juATPkJc4X7NtXvXKwYOTFDaMIL25YRTQgxKxc205ewNBYcTnFSDLDzdidRB5mhfxglhoMxC8@rUgbxPgd@aHM35AWy4Lmzb@z0UlRHY/4Xmuom3GU0lNqK85Dqn9Svdunzd0Lh3KY4MOKoLve/QE "Clean – Try It Online")
[Answer]
# [Python 2](https://docs.python.org/2/), 69 + 3 (`TZ=`) = 72 bytes
```
from time import*;s=time()
while 1:print ctime(time()-s)[11:19]+'\r',
```
This runs in a continuous loop, without sleeping, updating the time on the same line rather than printing a new line each second. (Still allowed by the rules, I hope.)
This slightly longer version (72+3=75 bytes) prints on a new line every second instead:
```
from time import*;s=time()
while 1:print ctime(time()-s)[11:19];sleep(1)
```
Both of these require you to be in the UTC timezone. On Linux you can achieve this by setting the `TZ` environment variable. E.g. `TZ= python`.
[Answer]
# [><>](https://esolangs.org/wiki/Fish), ~~106 bytes~~ 82 + 9 = 91 bytes
*Thanks to Jo King for suggesting the `-a` flag! Check out [their answer](https://codegolf.stackexchange.com/a/152168/66104) too.*
```
0v+1oan<n0/
:/<</?(a:,*a6-}:%*a6:,*a6-}:%*a6:\\
n<n0/<</?(a:ro":"
":"n<n0/<</?(a:o
```
[Try it online!](https://tio.run/##S8sszvj/36BM2zA/Mc8mz0Cfy0rfxkbfXiPRSkcr0Uy31koVSKGwY2K4wCqhyorylayUuIAYWTD/////uiV6BoZGpv91EwE "><> – Try It Online") (but you'll have to wait for the 60 second timeout).
I got to use a feature of ><> that I've never needed before: this code requires the flag `-t.0125`, which sets the execution speed to 0.0125 seconds per tick, or 80 ticks per second. There's also the `-a` flag, which makes whitespace count as a tick (in some cases — the interpreter is a bit weird about this).
Basically, the code keeps a counter that's incremented each time the fish goes through the loop, and the rest of the loop converts the counter to `hh:mm:ss` format and prints it. The loop takes exactly 80 ticks.
This should work in theory, but in practice, each tick is slightly longer than 0.0125 seconds, because of computation time. Changing the `\\` on the second line to `<<` gives more accurate timings on TIO.
You can also watch the code in action at the [fish playground](https://fishlanguage.com/playground), except that this interpreter treats whitespace slightly differently from the official interpreter. Alternatively, you can remove the flags on TIO to make the code run at top speed, to verify the behaviour for times after one minute.
[Answer]
# Java 8, full program, 150 bytes
```
interface M{static void main(String[]a)throws Exception{for(int i=0;;Thread.sleep(1000))System.out.printf("%02d:%02d:%02d%n",i/3600,i/60%60,i++%60);}}
```
[Try it here (times out after 60 seconds, so I've set the sleep to 1 to see more output).](https://tio.run/##PcyxDoIwFIXhV2lISNqgWDVhkDg6OuFmHBp6kYvSNu0VNYRnr51czjedf1CTWlsHZtCPGNEQ@E61wM5zIEXYssmiZqNCwxvyaO7XmxLUe/sO7PRpwRFaM3fW8/RleJR1fek9KF2GJ4DjWyGabyAYS/ui0qUCdTzL5U4f/pObbIWbfSVlopJ5lSyKhKiXJcYf)
**Explanation:**
```
interface M{                    // Program:
  static void main(String[]a)   //  Mandatory main-method
     throws Exception{          //    Mandatory throws for Thread.sleep
    for(int i=0;                //   Start at 0
        ;                       //   Loop indefinitely
         Thread.sleep(1000))    //     After every iteration: Sleep for 1 sec
      System.out.printf("%02d:%02d:%02d%n",
                                //    Print in the format "HH:mm:ss\n":
        i/3600,i/60%60,i++%60); //     The hours, minutes and seconds
                                //     (and increase `i` by 1 afterwards with `i++`)
                                //   End of loop (implicit / single-line body)
  }                             //  End of mandatory main-method
}                               // End of program
```
---
# Java 8, function, 94 bytes
```
v->{for(int i=0;;Thread.sleep(1000))System.out.printf("%02d:%02d:%02d%n",i/3600,i/60%60,i++%60);}
```
[Try it here (times out after 60 seconds, so I've set the sleep to 1 to see more output).](https://tio.run/##ZU89a8MwEN37Kw6DQSKJo7TgISLdOjaLS5bQQZXlRKkiCUl2Gox/u3uuS5fC3T0OHu/jIjqxcl7ZS/05SiNihFehbf8AoG1SoRFSwX56ATqna5DkMEFH0zm4W4SXL6l80s5y5Ay4ODGJpCXswcIOxm713DcuENQDvWOcv52DEnURjVKebCit7jGpa@HaVPiArIZkOXust38nt9lSr59KxhBKlpeIiwUC5cPIZ0/ffhj0/LX@iXrFIqRKKHk6voP4l3huZQtJbGsMnQsM4zc)
**Explanation:**
```
v->{   // Method with empty unused parameter and no return-type
  ...  //  Same as the program above
}      // End of method
```
Here is a small gif to see it works as intended when 1000 ms are used:
[![enter image description here](https://i.stack.imgur.com/lp5uI.gif)](https://i.stack.imgur.com/lp5uI.gif)
[Answer]
# PHP, ~~59~~ 48 bytes
```
while(1){sleep(1);echo date('H:i:s',$i++)."\n";}
```
Inspired by [Darren H's answer](https://codegolf.stackexchange.com/questions/151772/implement-a-simple-stopwatch/151805#151805).
*Old version* : 
```
<?php while(1){sleep(1);echo date('H:i:s',$i++-3600)."\n";}
```
[Answer]
# [Shell](https://en.wikipedia.org/wiki/Unix_shell), 177 bytes
Notice that this is not entirely POSIX conformant because it uses `date +%s`, which is a common `date` expansion.
```
a=`date +%s`;while true;do b=`date +%s`;s=`expr $b - $a`;h=`expr $s / 3600`;s=`expr $s % 3600`;m=`expr $s / 60`;s=`expr $s % 60`;printf '\r%02d:%02d:%02d' $h $m $s;sleep 1;done
```
[Answer]
# Ruby, ~~192~~ 117 bytes (Credit to Dada)
```
t=Time.now
loop do
m,s=(Time.now-t).to_i.divmod(60)
h,m=m.divmod(60)
printf"%02d:%02d:%02d
",h,m,s
sleep 1
end
```
## How does it work?
Going to use the expanded version (Conversion to a time is given as a separate function and uses a different output format):
```
def format_secs(s) # Converts the value in seconds to the required format
    mins, secs = s.divmod(60) # divmod returns the quotient and the remainder of a number
    hours, mins = mins.divmod(60)
    [hours,mins,secs].map { |e| e.to_s.rjust(2,'0') }.join ':'
    =begin
    [hours,mins,secs] -Creates a new array using the values allready provided for hours, minutes and seconds
    .map { - Creates a new array based on a operation on each of an array's values
    .to_s.rjust(2,'0')} - Turns the number into a string, and then adds "0" if needed to make the timer's result at least two digits
    .join ':' - Combines the result of the operation into a single string with a ":" in between the two numbers
    =end
end
t = Time.now # Saves the time at the program's (Rough) start
loop do
    puts format_secs((Time.now - t).to_i) # Returns the result of  the "format_secs" operation on the difference between the two times (in seconds) converted to a pure integer
    sleep 1 # Waits for one second
end
```
[Answer]
# APL NARS, ~~109 63~~ 57 chars
```
q;t
t←0
{∊⍵,¨':: '}{1<⍴x←⍕⍵:x⋄'0',x}¨(3⍴60)⊤⌊t+←⎕DL 1⋄→2
```
3+3+48+3=57 (seen the others Apl solutions too)
```
{1<⍴x←⍕⍵:x⋄'0',x}
```
convert the INT ⍵ in the string of digits in a way if the lenght of that string is 1 than add one '0' in front of it
```
{∊⍵,¨':: '}
```
combine array in ⍵ with the array ':: '
```
00:00:01 
00:00:02 
00:00:03 
00:00:04 
00:00:05 
00:00:06 
00:00:07 
00:00:08 
00:00:09 
```
[Answer]
# [q/kdb+](http://kx.com/download/), 40 bytes
**Solution:**
```
.z.ts:{-1($)18h$a+:1};a:-1;(.)"\\t 1000"
```
**Example:**
```
q).z.ts:{-1($)18h$a+:1};a:-1;(.)"\\t 1000"
q)00:00:00
00:00:01
00:00:02
00:00:03
00:00:04
00:00:05
```
**Explanation:**
There are three commands being executed here:
1. `.z.ts:{-1($)18h$a+:1}; / override timer function`
2. `a:-1; / initialise variable a to -1`
3. `(.)"\\t 1000" / start the timer with 1000ms precision`
Breakdown of the timer function:
```
.z.ts:{-1 string 18h$a+:1} / ungolfed timer function
      {                  } / lambda function
                     a+:1  / add 1 to variable a
                 18h$      / cast to seconds
          string           / cast to string
       -1                  / write to stdout
.z.ts:                     / assign this function to .z.ts
```
**Bonus:**
Alternative 1 for **41 bytes**:
```
a:.z.t;.z.ts:{-1($)18h$x-a};(.)"\\t 1000"
```
Alternative 2 for **26 + 7 bytes = 33 bytes**
```
.z.ts:{-1($)18h$a+:1};a:-1
```
and adding `-t 1000` as arguments to the q binary.
[Answer]
# Powershell, 52 bytes
Newest (52 Bytes):
```
For($a=0){date -H:0 -Min:0 -S:$a -U:%T;Sleep 1;$a++}
```
[Try it online!](https://tio.run/##K8gvTy0qzkjNyfn/3y2/SEMl0dZAszolsSRVQdfDykBB1zczD0QFW6kkKuiGWqmGWAfnpKYWKBhaqyRqa9f@/w8A "PowerShell – Try It Online")
It no longer requires admin, the solution is actually much simpler than before.
~~Using .Net (61 Bytes):~~
```
[DateTime]::Now.Date|set-date;For(1){get-date -U %T;Sleep(1)}
```
The .Net version exploits that Now.Date strips out the time, so it outputs 12:00 AM as the time. See: <https://stackoverflow.com/a/9630340/8303961>
~~Using only built-in commandlets (66 Bytes):~~
```
get-date -H:0 -Min:0 -S:0|set-date;For(1){get-date -U %T;Sleep(1)}
```
~~Both versions have to be run in a elevated powershell window due to changing the system time with set-date cmdlet.~~
]