text:
Make me an upside-down Christmas tree!
Challenge
We all know about normal Christmas trees - but how about an upside-down Christmas tree! This is a fairly easy, Christmas themed challenge. The objective of this challenge is to make me an ASCII upside-down Christmas tree. Here are the rules for this challenge:

Accept an odd, positive integer. You can assume it will always be between 7 and 51.
The base of the tree will be made of the characters:
___
\ /
 |

The top of the tree (the star), will be made up of a single *.
Each line of the tree will be constructed using the format <?> where ? is any number of -s. For example, if making a line of length 5, the line should be <--->. Or if making a line of length 8, the line should be <------>.
Here is how the body of the tree should be constructed:

Take the odd number n given as input, and create a line of the tree that length.
Subtract 4 from n and create a line of the tree that length.
Subtract 2 from n and create a line of the tree that length.
Decrement n by 2. After that, unless n equals 5, go back to step 2.

The base (see step 2.) the star (see step 3.) and each line of the tree (see steps 4. and 5.) should all be centered using the original odd number input (see step 1.) as the maximum width.

Examples/Test Cases
odd number inputed: 7
  ___
  \ /
   |
<----->      line length -> 7
  <->        line length -> 7 - 4 = 3
 <--->       line length -> 7 - 2 = 5
   *

odd number inputed: 13
     ___
     \ /
      |
<----------->      line length -> 13
  <------->        line length -> 13 - 4 = 9
 <--------->       line length -> 13 - 2 = 11
   <----->         line length -> 11 - 4 = 7
  <------->        line length -> 11 - 2 = 9
    <--->          line length -> 9 - 4 = 5
   <----->         line length -> 9 - 2 = 7
     <->           line length -> 7 - 4 = 3
    <--->          line length -> 7 - 2 = 5
      *

odd number inputed: 9
   ___
   \ /
    |
<------->      line length -> 9
  <--->        line length -> 9 - 4 = 5
 <----->       line length -> 9 - 2 = 7
   <->         line length -> 7 - 4 = 3
  <--->        line length -> 7 - 2 = 5
    *

odd number inputed: 17
       ___
       \ /
        |
<--------------->      line length -> 17
  <----------->        line length -> 17 - 4 = 13
 <------------->       line length -> 17 - 2 = 15
   <--------->         line length -> 15 - 4 = 11
  <----------->        line length -> 15 - 2 = 13
    <------->          line length -> 13 - 4 = 9
   <--------->         line length -> 13 - 2 = 11
     <----->           line length -> 11 - 4 = 7
    <------->          line length -> 11 - 2 = 9
      <--->            line length -> 9 - 4 = 5
     <----->           line length -> 9 - 2 = 7
       <->             line length -> 7 - 4 = 3
      <--->            line length -> 7 - 2 = 5
        *

Rules

Standard loopholes apply.
This is code-golf, so the shortest answer in bytes wins!

Seeing as the input is guaranteed to be an odd number, can we take its index in the sequence of odd numbers?

Also - repeat the above steps until the odd number minus 2 equals 5 - in the first input, the odd number is 7, and 7-2=5, therefore the tree should end instantly (I know what you mean, but it needs rephrasing)

@FlipTack I'm not exactly sure what you mean. If the odd number is 7, the minimum input, you would first create the three tree lines (sub-steps .1.1, .1.2, .1.3), then subtract 2 from the odd number and test if it equals 5. The instruction to check if the "odd number minus 2 equals 5" is at the end, the other three steps should be performed first. But to answer your first comment, that would be fine.

@FlipTack I think he’s asking whether you have to accept 7 as input or if you can accept 4, as in the fourth odd number (or 3 if it’s 0-indexed).

From title: "Ok, you are now an upside down Christmas tree."

Python 3, 127 121 105 103 100 98 bytes
This is an unnamed lambda function which returns a list of lines:
lambda o:[s.center(o)for s in['___','\ /','|',*[f'<{"-"*(o-i+2-i%2*3)}>'for i in range(4,o)],'*']]

Try it online!
The main part of this answer is (o-i+2-i%2*3), which works out the number of dashes to have on a line. The rest of the answer is simply converting this into the desired ASCII-art.
Many thanks to Mr. Xcoder, for shaving 6 bytes, and discussing golfs with me in chat.
Thanks also to Lynn for noticing that 3*(i%2) can be i%2*3, 2 bytes shorter!

121 bytes using some very little math tricks and f-strings

Whenever I post a Python answer, no matter the time of day or his current location, @Mr.Xcoder has a golf to give :)

Welp, this easily beats my 250 bytes+ Python solution. Nice job! +1

o-i+2-i%2*3 saves two bytes.

@Lynn Good spot, updated.

C, 163 bytes
#define P;printf(
i;g(l){P"%*c",1+i-l--/2,60);for(;--l P"-"))P">\n");}f(n){i=n/2 P"%*c__\n%*c /\n%*c|\n",i,95,i,92,i,32);for(g(n);n>5;g(n-=2))g(n-4)P" %*c",i,42);}

Try it online!
Unrolled:
#define P;printf(

i;
g(l)
{
    P"%*c", 1+i-l--/2, 60);
    for (; --l P"-"))
    P">\n");
}

f(n)
{
    i=n/2
    P"%*c__\n%*c /\n%*c|\n", i, 95, i, 92, i, 32);

    for(g(n); n>5; g(n-=2))
        g(n-4)

    P" %*c", i, 42);
}

Proton, 83 bytes
Thanks to FlipTack for saving 4 bytes, and for collaborating in chat (we actually form a great team). Indirectly saved 2 bytes thanks to Lynn.
o=>[s.center(o)for s:['___','\ /','|']+['<'+"-"*(o-i+2-i%2*3)+'>'for i:4..o]+['*']]

Try it online!

SOGL V0.12, 35 30 bytes
┌* <++L
%⁽⁄6‘√.⁾δ№{⁽LFL}j *+§Γ

Try it Here!
Uses Neil's Charcoal algorithm, takes input as the index in the odd numbers - so 13 would correspond to the input 7

Charcoal, 28 bytes
__⸿ /⸿|Ｆ⮌…¹⊘Ｎ«⸿⊕ι>⸿⊖ι>»‖Ｂ← *

Try it online! Link is to verbose version of code. Explanation:
__⸿ /⸿|

Print the base.
Ｆ⮌…¹⊘Ｎ«

Loop from half of the input number down to 1.
⸿⊕ι>⸿⊖ι>»

Print two lines, the first with one more - than the loop index, the second with one fewer.
‖Ｂ←

Mirror to complete the tree.
 *

Place the star.

Retina, 89 bytes
.+
$*->
^--
<
+`( *<)----(-+>)$
$&¶  $1$2¶ $1--$2
s`.*¶( +)<->.*
$1___¶$1\ /¶$1 |¶$&¶$1 *

Try it online! Explanation: The first stage converts the input to unary and appends a >. The second stage replaces two -s with a < to correct the line length. The third stage then replicates the branch but slightly shorter each time until the branch cannot be shortened any further. The final stage adds the base and the star.

Javascript 506 bytes
Golf-version:
function tree(i){const mid=(i+1)/2;const leg1=' '.repeat((mid-2))+`___
`;const leg2=' '.repeat((mid-2))+`\\ \/
`;const leg3=' '.repeat((mid-1))+`|
`;let xmasTree=leg1+leg2+leg3;for(let j=0;j<(i-4);j++){if(j%2===0){let v=j/2;let t=i-2*v-2;let body1=" ".repeat(j/2)+"<"+"-".repeat(t)+">"+`
`;xmasTree=xmasTree+body1}else{let k=1+Math.ceil(j/2);let h=i-2*k-2;let body2=' '.repeat(k)+'<'+'-'.repeat(h)+">"+`
`;xmasTree=xmasTree+body2}}
const head=' '.repeat((mid-1))+'*'
xmasTree=xmasTree+head;return xmasTree}

Ungolf-version:
function tree(i){
  const mid = (i+1)/2;
  const leg1 = ' '.repeat((mid-2)) + `___
`;
  const leg2 = ' '.repeat((mid-2)) + `\\ \/
`;
  const leg3 = ' '.repeat((mid-1)) + `|
`;
  let xmasTree = leg1 + leg2 + leg3;
  for (let j = 0; j<(i-4); j++) {
    if (j%2===0) {
      let v = j/2;
      let t = i-2*v-2;
      let body1 = " ".repeat(j/2)+"<"+"-".repeat(t) +">"+`
`;
      xmasTree = xmasTree + body1;
    } else {
      let k = 1 + Math.ceil(j/2);
      let h = i-2*k-2;
      let body2 = ' '.repeat(k)+ '<'+ '-'.repeat(h) + ">"+`
`;
      xmasTree = xmasTree + body2;
    }
  }
  const head = ' '.repeat((mid-1)) + '*'
  xmasTree = xmasTree + head;
  return xmasTree;
}

Usage: console.log(tree(13)), console.log(tree(17)),
ES6 165 bytes (from my friend)
Golf-version:
p=n=>{l=_=>console.log(`${' '.repeat((n-_.length)/2)}${_}`);t=_=>_==1?'*':'<'+'-'.repeat(_-2)+'>';x=n;l('___');l('\\ /');l('|');for(;x!==3;){l(t(x));l(t(x-4));x-=2}}

Ungolf-version:
p = n => {
  l = _ => console.log(`${' '.repeat((n-_.length)/2)}${_}`);
  t = _ => _ == 1 ? '*' : '<' + '-'.repeat(_-2)+'>';
  x = n;
  l('___');l('\\ /');l('|');
  for(;x!==3;) {
    l(t(x)); l(t(x-4));x-=2;
  }
}

Usage: p(31); p(17);

You could golf this a lot, by using only 1-letter variable names, removing const keywords, etc

PowerShell, 131 bytes
$i=2;$x="$args"..5|%{' '*($j=if($_%2){$i-2}else{($i++)})+'<'+'-'*($_-(5,2)[$_%2])+'>'};($y=' '*++$j)+"___";"$y\ /";"$y |";$x;"$y *"

Try it online!
Well, this is a right mess to anyone not conversant in PowerShell... so, let's see how well I can explain how it works.
For the explanation, I'll be using input = 17.
We start off simple enough, with setting helper variable $i=2 and setting $x to <something>, with the <something> starting as a range from the input $args down to 5, so 17,16,15,...,6,5. That range is pumped into a for loop.
Each iteration, we start with setting helper variable $j to be the result of an if statement, if($_%2){$i-2}else{($i++)}. If it's odd, $j=$i-2, otherwise $j=($i++). This, coupled with $i=2 at the beginning, gives us the sequence 0, 2, 1, 3, 2, 4, 3, 5... which just so happens to correspond exactly to how many spaces we need to prepend to our tree line. ;-) We take ' ' and string-multiply it out by that number.
Next we need our branches. This is done with '<' plus the middle part '-' multiplied out, plus the end '>'. The multiplication is done by recognizing that the - alternate in a 2, 5, 2, 5, 2... pattern based on the input number $_, so we're selecting from a pseudo-ternary based on that pattern.
For further clarification, here are the first couple terms in each section:
$_ = 17 16 15 14 13 12 11 10
$j =  0  2  1  3  2  4  3  5
mid=  2  5  2  5  2  5  2  5
'-'= 15 11 13  9 11  7  9  5

So now we've set $x to be an array of branches (i.e., strings). Outside the loop, we now build our tree "top" with the appropriate number of spaces saved into $y, then display our branches $x, and then the tree "bottom" with the *. Each of those are left on the pipeline and output is implicit with a newline between items.

JavaScript (ES6), 150 147 bytes
N=>{for(s=' '[r='repeat'](N/2-1),s+=`___
${s}\\ /
${s} |
`,n=N,l=n=>' '[r](N/2-n/2)+(n-1?`<${'-'[r](n-2)}>
`:'*');n-3;n-=2)s+=l(n)+l(n-4)
return s}

f=

N=>{for(s=' '[r='repeat'](N/2-1),s+=`___
${s}\\ /
${s} |
`,n=N,l=n=>' '[r](N/2-n/2)+(n-1?`<${'-'[r](n-2)}>
`:'*');n-3;n-=2)s+=l(n)+l(n-4)
return s}

console.log(f(7))
console.log(f(9))
console.log(f(13))
console.log(f(17))

Canvas, 28 bytes
-×>＋∔
__¶ /¶|╶┤ｒ⇵｛├⁸¹⁸｝ｋ*∔↔│

Try it here!
A port of my SOGL answer which is a port of Neil's Charcoal answer.

N=>{for(s=' '[r='repeat'](N/2-1),s+=`___
${s}\\ /
${s} |
`,l=n=>' '[r](N/2-n/2)+n-1?`<${'-'[r](n-2)}>
`:'*');N-=2;s+=l(N)+l(N-4);return s}

My attempt at JS ESGoogoltriplex.

f=

N=>{for(s=' '[r='repeat'](N/2-1),s+=`___
${s}\\ /
${s} |
`,l=n=>' '[r](N/2-n/2)+n-1?`<${'-'[r](n-2)}>
`:'*');N-=2;s+=l(N)+l(N-4);return s}

console.log(f(7))
console.log(f(9))
console.log(f(13))
console.log(f(17))


text:
Hilbert's binary Hotel
In this challenge you will be asked to implement any function (or full program) that fulfills two properties.  Those properties are:

Your function must be an injective (reversible) function from the polynomials with non-negative integer coeffecients to the non-negative integers.  This means no two unequal inputs can map to an equal output.
Your function must preserve the total number of "on bits" from its input to its output.  This means if you count the 1 bits of each coefficient of the polynomial, their sum should be the same as the number of 1 bits in the binary representation of the output.  For example 9 is 1001 in binary so it has 2 1 bits.

IO
A non-negative integer polynomial is the same as a infinite list of non-negative integers such that after a certain point all the integers are zero.  Thus, polynomials may be represented either by infinite lists (although this is probably undesirable) or by finite lists with implicit zeros after the end of the list.
The key distinction between polynomials and finite lists is that adding a zero to the end of a list will change the list:

While adding a zero to the end of a polynomial does not change its value:

Thus if your function takes a finite list representing a polynomial as input, adding a zero must not change its result.
When representing polynomials as lists, you may represent them either with the first or last entry representing the constant term.  For example you could have either of the following possibilities:

In the first case, adding zeros to the end of the list should not change the result; in the second case, adding zeros to the front of the list should not change the result.
Of course if your language supports polynomials you may take those as inputs.
Output should be a non-negative integer output via any standard methods.

This is code-golf so answers will be scored in bytes, with fewer bytes being better.

Is [] or [0] a valid input?

@JungHwanMin Yes, both are, they are the zero polynomial.

I know you mean to put 1 to split zeros, but some ways may work and seem not that good...

Can I require the leading zeros not written?

@l4m2 I'm sorry, but I don't understand either of your comments.  As far as your question goes, leading zeros on what?  The polynomial, the coefficients?  I'm not sure what you mean by "zeros not written" either.

@WheatWizard I think it's the implicit ones.

More specifically, can we assume that the null polynomial will always be represented as, e.g., [0] and not as [] or [0, 0].

Are the images really necessary (i.e. they cannot be represented using rich text)??? Because people without the ability to see images cannot see your challenge in its  entirety.

@Mindwin Well for one the images are only examples and are not strictly necessary for the challenges.  Secondly I rich text looks bad.

@Dennis I'm going to say you may assume there is at least one zero in the null polynomial.

Jelly, 8 bytes
BFṢḄæ«ÆẸ

Try it online!
Left inverse, 5 bytes
Bċ0ÆE

Try it online!
How it works
BFṢḄæ«ÆẸ  Main link. Argument: A (array)

B         Binary; convert each integer in A to base 2.
 F        Flatten; concatenate the resulting binary arrays.
  Ṣ       Sort the resulting bit array.
   Ḅ      Convert from base 2 to integer, yielding an integer x with as much set
          bits as there are set bits in A.
      ÆẸ  Unexponents; convert A = [a1, a2, ...] to y = (p1**a1 + p2**a2 + ...),
          where pn is the n-th prime number.
          By the fundamental theorem of arithmetic, the resulting integer is unique
          for each array A without trailing zeroes.
    æ«    Bitshift left; compute x * 2**y.

Wolfram Language (Mathematica), 36 20 bytes
x#/.x->2^(#/.x->2)!&

Try it online!
Takes a polynomial f(x) as input. Evaluates y*f(y), where y = 2^(f(2)!). Regrettably, this means that the outputs get pretty large.
Evaluating y*f(y) will preserve the number of 1-bits whenever y is a power of 2 bigger than any coefficient, which is true for the value chosen above. We choose y = 2^(f(2)!) to make the result injective:

Two different inputs with the same value of y will give different outputs because we're essentially reading two different numbers in base y.
If we fix k=f(2) and therefore y, the smallest value of y*f(y) is achieved when the input is a constant polynomial equal to k and the largest value is achieved when the input is the polynomial giving the base-2 expansion of k. In the first case, y*f(y) = 2^(k!)*k, and in the second case, y*f(y) < 2^(k!*ceil(lg k)), which is less than 2^((k+1)!)*(k+1).
As a result, for two polynomials f and g with f(2) < g(2), the integer we get from f will be less than the integer we get from g.

Wolfram Language (Mathematica), 61 bytes
Tr[2^((2#2-1)2^#)&@@@Position[Reverse/@#~IntegerDigits~2,1]]&

Try it online!
Two positive integers can be mapped to a single positive integer. Let a, b be two positive integers. Then a, b -> (2a - 1) 2^(b-1) is a bijection from NxN to N.
This function finds the position of all 1 bits in the input (from the 1s place), and applies an injective-only variant of the above map to each position. Then, each resulting number is raised to the power of two, and all numbers are added together (which is okay since we applied an injective NxN -> N map).
For example:
{1, 2, 3}
{{1}, {1, 0}, {1, 1}}             (* Convert to binary *)
{{1}, {0, 1}, {1, 1}}             (* Reverse each *)
{{1, 1}, {2, 2}, {3, 1}, {3, 2}}  (* Position of 1s *)
{2, 12, 8, 24}                    (* Inject to N *)
{4, 4096, 256, 16777216}          (* Raise to the power of 2 *)
16781572                          (* Add *)

Inverse function (124 bytes)
##+#&~Fold~#&@*Reverse/@Normal@SparseArray[{Log2[j=#~BitAnd~-#],(#/j+1)/2}->1&@@@(Reverse[#~IntegerDigits~2]~Position~1-1)]&

Here's an inverse function to test for injectivity.
Try it online!

Python 2, 118 117 114 103 100 bytes
100 bytes by Jonathan Frech:
a=input()
while a[0]<1:a.pop(0)
y="".join("2"+bin(v)[2:]for v in a)
print~-2**y.count("1")<<int(y,3)

Try it online!
103 bytes with a golfing possibility1
a=input()
while a[0]<1:a.pop(0)
x="".join(map(bin,a))
print~-(1<<x.count("1"))<<int(x.replace(*"b2"),3)

Try it online!
-15 bytes thanks to Jonathan Frech
It creates a number that first contains the "on bits" and then the unary representation of the array interpreted as a trinary number.
The trinary number is created by converting the numbers to binary strings (0bNNN), then replacing b with 2.
1I could have saved 14 bytes by converting it to a base-12 number instead, but TIO ran out of memory so I decided to use this.

05AB1E, 14 bytes
gÅpImPoIbS{2β*

Try it online!
Yields the same results as Dennis' Jelly solution, yet the technique is slightly different.
How?
Let's try the input  [1, 2, 3]:
gÅpImPoIbS{2β* | Full program.
               | STACK: [[1, 2, 3]]
               |
g              | Push the length.
               | STACK: [3]
 Åp            | Generate the first N primes.
               | STACK: [[2, 3, 5]]
   Im          | Push the input, and apply pairwise exponentiation.
               | STACK: [2, 9, 125]
     P         | Push the product.
               | STACK: 2250
      o        | Push 2 ** N.
               | STACK: 2 ** 2250 (way too large)
       Ib      | Push the input and convert to binary.
               | STACK: [2 ** 2250, ['1', '10', '11']].
         S{    | Sort all the characters.
               | STACK: [2 ** 2250, ['0', '1', '1', '1', '1']]
           2β  | Convert from binary.
               | STACK: [2 ** 2250, 15]
             * | Multiplication.
               | STACK: [2 ** 2250 * 15]
               | Implicitly print the top of the stack (2 ** 2250 * 15).

Python 2, 74 bytes
r='print 0';s='<<'
for n in input():r+=oct(n)[:0:-1];s+='0'+'1'*n
exec r+s

Try it online!

JavaScript 6, 96 83 Bytes
x=>(t=x.map(k=>(x[0]+=k)&&2+k.toString(2)).join``).replace(/0|2/g,'')+'0'.repeat(t)

outputs a binary expression
([1,2]) => 3*2^21210(Decimal)
([0,1,2]) => 3*2^21210
([1,2,0]) => 3*2^2121020
([1,2,3,4]) => 31*2^212102112100(Threotically)

zero will lead to an empty string representing zero

replace(/0|2/g,0) seems also work, but harder to decode

Not sure about x=>(t=x.map(k=>(x[0]+=k)&&2+k.toString(2)).join``).replace(/2/g,'0'.repeat(t)). Feel okay but can't prove

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

sort: votes


text:
Implement a Simple Stopwatch
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, shortest code in bytes win!

Note for later challenges, clarification in the comments is a bad thing to do. reference

MATL, 17 16 bytes
`Z`12L/13XOD1Y.T

Try it at MATL Online!
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)

How in the world did you answer this 37 minutes after it has been closed? o_O blames caching

@Mr.Xcoder I recently learned to use the Force

Operation Flashpoint 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:

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.

I wasn't expecting operation flashpoint.

@Polyducks nobody expects operation flashpoint

@Pureferret "If you see the flash, it is already too late."

Since in Unix, a CR will overwrite the line, i think the second answer is validated by ‘either CR, LF, or CRLF are allowed’

@StanStrum At least on my Ubuntu CR will not overwrite the line. In fact, CRLF, LFCR and LF are all semantically equivalent.

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 + 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.

Since it doesn't change the bytecount I'd separate the first date from the rest with a nice little linefeed. But it might be too nice for someone able to come up with something like your second solution >:-(

date -s0 prints the new time to STDOUT; I'm using the pipe to silence that output.

Oh right, thanks for the explanation !

APL (Dyalog Unicode), 51 bytes
Full program body.
s←⎕AI
1↓∊':'@1∘⍕¨100+3↑0 60 60 1E3⊤3⊃⎕AI-s
⎕DL 1
→2

Try it online! (Press Ctrl+Enter to start, and again to stop.)
⎕AI Account Information (user ID, compute time, connect time, keying time)
s← assign to s (for start 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 Delay one second
→2 go to line number two

R, 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

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.

AFAICT, $[] is a deprecated/undocumented but still supported form of $(()).  I'm not sure if it's commonly used in code-golf answers, but the general rule is that your code only has to work on at least one version of the interpreter for your language.  IMO it's fine.

s=0 isn't required, as arithmetic substitution will treat an unset variable as 0. -u also isn't needed if you just assume the default timezone (UTC).

-u is needed on my machine :)

Matlab (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

Welcome to the site! :)

@LuisMendo Thanks for the suggestion, but I didn't understand... In your example, what is the variable t? Also, the input to datestr is in days, so I would have to divide by 86400, which would increase the byte count by two...

Swift, 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
}

JavaScript (ES6), 99 bytes

f=_=>console.log(new Date(new Date-d).toUTCString().slice(17,25))
f(d=Date.now(setInterval(f,1e3)))

The hours do not start at 0 for me. The offset changes depending on the system clock timezone. (Win10)

@LukeS Whoops, fixed!

Julia 0.6, 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!
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.

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;

PHP open tags can be omitted in the answer saving you 6 bytes.

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, 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.

Python 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
Reduced from 88 bytes to 85 by Erik the Outgolfer

You can save one byte by replacing "%02d:%02d:%02d" with (":%02d"*3)[1:]

You don't need %24, behavior is undefined after 23:59:59.

@EriktheOutgolfer Good point, updated.

><>, 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!
+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 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.

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.

AWK, 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.

Your program doesn't seem to print 00:00:00 at the moment it's started.

Jelly, 23 bytes
:⁽½c,60;%60d⁵j”:ṄœS1ṛ‘ß

Try it online!

Does it work with times above 1 minute?

@H.PWiz It should, running some tests. EDIT: Looks like a dividend is wrong for the hours...fixed for a little save!

APL (Dyalog), 37 bytes
{∇⍵+×⎕DL 1⊣⎕←1↓∊':'@1∘⍕¨100+⍵⊤⍨3⌿60}0

Try it online!
Full program.
Pretty similar to Adám's answer, however independently written and uses a non-⎕AI-based approach.

Python 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)

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)

Clean, 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!

PHP, 59 48 bytes
while(1){sleep(1);echo date('H:i:s',$i++)."\n";}

Inspired by Darren H's answer.
Old version :
<?php while(1){sleep(1);echo date('H:i:s',$i++-3600)."\n";}

PHP open tags can be omitted in the answer saving you 6 bytes.

Great thought, but 3600 needs to be 86400 otherwise the counter starts at 23:00:00 so unfortunately you gain a byte, still beat me by 9 though!

@DarrenH I think it depends on your locale, I hadn't thought about that. I'm in GMT+1, that's why I added 3600, but I guess for English people, you could remove the -3600 altogether, which would save 5 bytes.

Python 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.

><>, 106 bytes 82 + 9 = 91 bytes
Thanks to Jo King for suggesting the -a flag! Check out their answer too.
0v+1oan<n0/
:/<</?(a:,*a6-}:%*a6:,*a6-}:%*a6:\\
n<n0/<</?(a:ro":"
":"n<n0/<</?(a:o

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, 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.

-1 byte by replacing the v in the first line with \! and removing two of the extra <. Another couple of bytes if you use the -a flag, which counts whitespace and skipped instructions as ticks

@JoKing, The -a flag let me golf it a bit more, thank you! I think you can use the \! trick in your code, too: Try it online!

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).
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).
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:

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

Normally, you should give people a chance to answer your challenge before answering it yourself. I recommend a week as some may only be here at certain times during the week.

@Adám I haven't accepted my answer, and at the time I posted much shorter answers (like yours) were submitted.

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

Welcome on the site! Every answer to a [tag:code-golf] challenge must be golfed. You should at least remove useless whitespaces, and use 1-character variable names. That would get you around 120 bytes, and using printf instead of puts can save a few more bytes: Try it online!. Happy golfing on PPCG!

Powershell, 52 bytes
Newest (52 Bytes):
For($a=0){date -H:0 -Min:0 -S:$a -U:%T;Sleep 1;$a++}

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.

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

x86-64 machine code (Linux system call): 78 bytes
RDTSC spin-loop timing, Linux sys_write system call.
x86-64 doesn't provide a convenient way to query the RDTSC "reference clock" frequency at run time.  You can read an MSR (and do a calculation based on that), but that requires kernel mode, or root + opening /dev/cpu/%d/msr, so I decided to make the frequency a build-time constant.  (Adjust FREQ_RDTSC as necessary: any 32-bit constant won't change the size of the machine code)
Note that x86 CPUs for several years have had fixed RDTSC frequency so it is usable as a timesource, not a core clock cycle performance counter unless you take steps to disable frequency changes.  (There are actual perf counters for counting real CPU cycles.)   Usually it ticks near the nominal sticker frequency, e.g. 4008 MHz for my 4.0 GHz i7-6700k regardless of turbo or powersaving.  (SO answer covering many aspects of RDTSC.)
Anyway, this busy-wait timing doesn't depend on load average / interrupts (like a calibrated delay-loop would), and also isn't sensitive to CPU power saving.  (Related: Stack Overflow answer with a spin-wait on RDTSC, with delay cycles calculated from nanoseconds, although it still needs the ref frequency set externally.)
This code will work for any x86 with a reference frequency below 2^32 Hz, i.e. up to ~4.29 GHz.  Beyond that, the low 32 of the timestamp would wrap all the way in 1 second, so I'd have to look at the edx high 32 bits of the result, too.
Summary:
push 00:00:00\n on the stack.  Then in a loop:

sys_write system call
ADC-loop over the digits (starting with the last) to increment the time by 1.  Wrapping / carry-out handled with a cmp / cmov, with the CF result providing the carry-in for the next digit.
rdtsc and save the start time.
spin on rdtsc until the delta is >= ticks per second of the RDTSC frequency.

NASM listing:
 1  Address                            ; mov  %1, %2       ; use this macro to copy 64-bit registers in 2 bytes (no REX prefix)
 2           Machine code           %macro MOVE 2
 3           bytes                      push  %2
 4                                      pop   %1
 5                                  %endmacro
 6
 7                                      ; frequency as a build-time constant because there's no easy way detect it without root + system calls, or kernel mode.
 8                                      FREQ_RDTSC equ 4000000000
 9                                  global _start
10                                  _start:
11 00000000 6A0A                        push     0xa                       ; newline
12 00000002 48BB30303A30303A3030        mov      rbx, "00:00:00"
13 0000000C 53                          push     rbx
14                                      ; rsp points to  `00:00:00\n`
20
21                                      ; rbp = 0                (Linux process startup.  push imm8 / pop is as short as LEA for small constants)
22                                      ; low byte of rbx = '0'
23                                  .print:
24                                      ; edx potentially holds garbage (from rdtsc)
25
26 0000000D 8D4501                      lea      eax, [rbp+1] ; __NR_write = 1
27 00000010 89C7                        mov      edi, eax     ; fd = 1 = stdout
28                                      MOVE     rsi, rsp
28 00000012 54                  <1>  push %2
28 00000013 5E                  <1>  pop %1
29 00000014 8D5008                      lea      edx, [rax-1 + 9]     ; len = 9 bytes.
30 00000017 0F05                        syscall               ; sys_write(1, buf, 9)
31
32                                      ;; increment counter string:  least-significant digits are at high addresses (in printing order)
33 00000019 FD                          std                        ;  so loop backwards from the end, wrapping each digit manually
34 0000001A 488D7E07                    lea      rdi, [rsi+7]
35                                      MOVE     rsi, rdi
35 0000001E 57                  <1>  push %2
35 0000001F 5E                  <1>  pop %1
36
37                                      ;; edx=9 from the system call
38 00000020 83C2FA                      add   edx, -9 + 3      ; edx=3 and set CF (so the low digit of seconds will be incremented by the carry-in)
39                                      ;stc
40                                  .string_increment_60:          ; do {
41 00000023 66B93902                    mov    cx, 0x0200 + '9'    ; saves 1 byte vs. ecx.
42                                      ; cl = '9' = wrap limit for manual carry of low digit.  ch = 2 = digit counter
43                                    .digitpair:
44 00000027 AC                          lodsb
45 00000028 1400                        adc      al, 0           ; carry-in = cmp from previous iteration; other instructions preserve CF
46 0000002A 38C1                        cmp      cl, al          ; manual carry-out + wrapping at '9' or '5'
47 0000002C 0F42C3                      cmovc    eax, ebx        ; bl = '0'.  1B shorter than JNC over a MOV al, '0'
48 0000002F AA                          stosb
49
50 00000030 8D49FC                      lea     ecx, [rcx-4]    ; '9' -> '5' for the tens digit, so we wrap at 59
51 00000033 FECD                        dec     ch
52 00000035 75F0                        jnz    .digitpair
53                                      ; hours wrap from 59 to 00, so the max count is 59:59:59
54
55 00000037 AC                          lodsb                        ; skip the ":" separator
56 00000038 AA                          stosb                        ; and increment rdi by storing the byte back again.  scasb would clobber CF
57
58 00000039 FFCA                        dec     edx
59 0000003B 75E6                        jnz   .string_increment_60
60
61                                      ; busy-wait for 1 second.  Note that time spent printing isn't counted, so error accumulates with a bias in one direction
62 0000003D 0F31                        rdtsc                         ; looking only at the 32-bit low halves works as long as RDTSC freq < 2^32 = ~4.29GHz
63 0000003F 89C1                        mov      ecx, eax             ; ecx = start
64                                  .spinwait:
65                                  ;    pause
66 00000041 0F31                        rdtsc                      ; edx:eax = reference cycles since boot
67 00000043 29C8                        sub      eax, ecx          ; delta = now - start.  This may wrap, but now we have the delta ready for a normal compare
68 00000045 3D00286BEE                  cmp      eax, FREQ_RDTSC   ; } while(delta < counts_per_second)
69                                   ;   cmp      eax, 40  ; fast count to test printing
70 0000004A 72F5                        jb     .spinwait
71
72 0000004C EBBF                        jmp .print
  next address = 0x4E = size = 78 bytes.

Uncomment the pause instruction to save significant power: this heats one core up by ~15 degrees C without pause, but only by ~9 with pause.  (On Skylake, where pause sleeps for ~100 cycles instead of ~5.  I think it would save more if rdtsc wasn't also slow-ish so the CPU isn't doing much a lot of the time).

A 32-bit version would be a few bytes shorter, e.g. using a 32-bit version of this to push the initial 00:00:00\n string.
16                          ;    mov      ebx, "00:0"
17                          ;    push     rbx
18                          ;    bswap    ebx
19                          ;    mov      dword [rsp+4], ebx    ; in 32-bit mode, mov-imm / push / bswap / push would be 9 bytes vs. 11

And also using 1-byte dec edx.  The int 0x80 system call ABI wouldn't use esi / edi, so the register setup for the syscall vs. lodsb / stosb might be simpler.

I could have used a nanosleep system call, but this was more interesting.  With root on Linux, it is possible to read the right MSR and programmatically get the RDTSC frequency.

q/kdb+, 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:

.z.ts:{-1($)18h$a+:1}; / override timer function
a:-1;                  / initialise variable a to -1
(.)"\\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.

Ocaml, 125 117 bytes
let rec f i=Printf.printf"%02d:%02d:%02d\n"(i/3600)(i/60 mod 60)(i mod 60);flush stdout;Unix.sleep 1;f(i+1)let()=f 0

This is the naive way to do it, minus useless spaces. With a regular coding style, it is :
let rec f i =
  Printf.printf "%02d:%02d:%02d\n" (i/3600) (i/60 mod 60) (i mod 60);
  flush stdout;
  Unix.sleep 1;
  f (i+1)
let () = f 0

[EDIT] I forgot to remove spaces before submission... (-8 bytes)

JavaScript (ES6), 68 67 bytes
f=m=>setTimeout(f,c=1e3,m+c|c,alert((8+new Date(m|0)).split` `[4]))

Assumes the alert is dismissed immediately (for example, by holding down the <enter> key); if that's not permitted then add 6 bytes for console.log.

Try it
alert overridden with console.log for your sanity!

alert=console.log
f=m=>setTimeout(f,c=1e3,m+c|c,alert((8+new Date(m|0)).split` `[4]))
f()

Umm, it starts at 01:00:00 instead of 00:00:00.

@KevinCruijssen; it might be locale dependent.

Ah, you're probably right, since The Netherlands is in the +1 timezone. Maybe add some code at the start of the Try it code to set the timezone to +0?

Windows Batch, 218 bytes
Only golfed a bit, can be improved.
@echo off
set/ah=m=s=0
:L
set r=00%h%
set r=%r:~-2%
set t=00%m%
set t=%t:~-2%
set y=00%s%
set y=%y:~-2%
echo %r%:%t%:%y%
set/as+=1
if %s%==60 set s=0&set/am+=1
if %m%==60 set m=0&set/ah+=1
timeout 1 /nobreak>nul
goto L

mIRC 7.49 53 Bytes
set %i 0 | timer 0 1 say $!duration(%i,3) $(|) inc %i

Batch 183 187 Bytes
@Set/AH=m=0,s=-1
:L
@(Set/As+=1,"1/(60-s)"||Set/As=0,m+=1,"1/(60-m)"||Set/Am=0,h+=1) 2> nul
@Set .s=0%s%&Set .m=0%m%&Set .h=0%h%
@Echo(%.h:~-2%:%.m:~-2%:%.s:~-2%&>nul Timeout 1&Goto:L

Perl 5, 87 bytes
$s=time;{$n=time-$s;printf"%02d:%02d:%02d\n",int$n/3600,int$n/60%60,$n%60;sleep 1;redo}

Try it online!
Note: The header section forces TIO to display the output; it is not required to run this on a local system.
Ungolfed:
$start = time;
{
    $now = time - $start;
    printf(
        "%02d:%02d:%02d\n",
        int($now / 3600),
        int($now / 60 % 60),
        $now % 60
    );
    sleep 1;
    redo;
}

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/3.0/

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Queue Our Decomposition
In this challenge I will ask you to find a QR decomposition of a square matrix.  The QR decomposition of matrix A is two Matrices Q and R such that A = QR.  In particular we are looking for Q to be an orthogonal matrix (that is QTQ=QQT=I where I is the multiplicative identity and T is the transpose) and R to be a upper triangular matrix (every value below its diagonal must be zero).
You will write code that takes a square matrix by any reasonable method and outputs a QR decomposition by any method.  Many matrices have multiple QR decompositions however you only ever need output one.
Elements of your resultant matrices should be within two decimal places of an actual answer for every entry in the matrix.
This is a code-golf competition so answers will be scored in bytes with fewer bytes being a better score.

Test Cases
These are only possible outputs, your outputs need not match all of these as long as they are valid.
0 0 0     1 0 0   0 0 0
0 0 0 ->  0 1 0   0 0 0
0 0 0     0 0 1 , 0 0 0

1 0 0     1 0 0   1 0 0
0 1 0 ->  0 1 0   0 1 0
0 0 1     0 0 1 , 0 0 1

1 2 3     1 0 0   1 2 3
0 3 1 ->  0 1 0   0 3 1
0 0 8     0 0 1 , 0 0 8

0 0 1     0 0 1   1 1 1
0 1 0 ->  0 1 0   0 1 0
1 1 1     1 0 0 , 0 0 1

0 0 0 0 1     0 0 0 0 1   1 0 0 0 1
0 0 0 1 0     0 0 0 1 0   0 1 1 1 0
0 0 1 0 0 ->  0 0 1 0 0   0 0 1 0 0
0 1 1 1 0     0 1 0 0 0   0 0 0 1 0
1 0 0 0 1     1 0 0 0 0 , 0 0 0 0 1

Comments are not for extended discussion; this conversation has been moved to chat.

Octave, 19 bytes
@(x)[[q,r]=qr(x),r]

Try it online!
My first Octave answer \o/
Octave’s qr has quite a few alternatives in other languages that return both Q and R: QRDecomposition (Mathematica), matqr (PARI/GP), 128!:0 - if I recall correctly - (J), qr (R)...

So… will you post that J solution or shall I?

@Adám I won’t. Go ahead and post it if you want.

Why doesn't 128!:0 work on an all-zero matrix‽

Does it work on all-zero matrices?

@LuisMendo Thanks a lot for the fix!

@Adám Fixed. Thanks for spotting that

Julia, 2 bytes
qr

The function qr accepts a square matrix and returns a Tuple of matrices: Q and R.
Try it online!

Nice to see you! It doesn't get any shorter than this :-)

I knew you would come back shortly. Welcome back! What a built-in BTW...

Wolfram Language (Mathematica), 15 bytes
QRDecomposition

Try it online!
I mean... what can I say?

R, 38 37 bytes
pryr::f(list(qr.R(q<-qr(m)),qr.Q(q)))

Try it online!

You don’t need that space...? pryr::f(list(qr.R(q<-qr(m)),qr.R(q)))

Does it work on all-zero matrices?

@Adám Thanks, I had made a stupid typo. Fixed now.

SageMath, 27 bytes
lambda x:matrix(RDF,x).QR()

Python 2, 329 324 bytes
import fractions
I=lambda v,w:sum(a*b for a,b in zip(v,w))
def f(A):
 A,U=[map(fractions.Fraction,x)for x in zip(*A)],[]
 for a in A:
    u=a
    for v in U:u=[x-y*I(v,a)/I(v,v)for x,y in zip(u,v)]
    U.append(u)
 Q=[[a/I(u,u)**.5 for a in u]for u in U];return zip(*Q),[[I(e,a)*(i>=j)for i,a in enumerate(A)]for j,e in enumerate(Q)]

We must use fractions to ensure correct output, see https://en.wikipedia.org/wiki/Gram%E2%80%93Schmidt_process#Numerical_stability
Indentation used:

1 space
1 tab

When indented you can save bytes by using ; to separate lines.  You can also often forgo the line break after :.  I would suggest playing around with these because I can see a few places this answer can be shorter using this technique.

@WheatWizard Thanks :)

Unfortunately, this won't work for matrices with null rows.

Python with numpy, 28 bytes
import numpy
numpy.linalg.qr


text:
How small can it get?
Starting with a positive integer N, find the smallest integer N' which can be computed by repeatedly dividing N by one of its digits (in base-10). Each selected digit must be a divisor of N greater than 1.
Example #1
The expected output for N = 230 is N' = 23:

Example #2
The expected output for N = 129528 is N' = 257:

Beware of non-optimal paths!
We could start with 129528 / 9 = 14392, but that would not lead to the smallest possible result. The best we can do if we first divide by 9 is:

Rules

Input can be taken in any reasonable format (integer, string, array of digits, ...).
This is code-golf, so the shortest answer in bytes wins!

Test cases
1         --> 1
7         --> 1
10        --> 10
24        --> 1
230       --> 23
234       --> 78
10800     --> 1
10801     --> 10801
50976     --> 118
129500    --> 37
129528    --> 257
8377128   --> 38783
655294464 --> 1111

I wonder if this series (1, 1, ..., 10, 11, 1, 13, ..., 1, ...) has an OEIS entry

It doesn't (yet), AFAICS.

Jelly, 8 bytes
÷DfḶß€Ṃo

Try it online!
Alternate version, much faster, 9 bytes
÷DfÆḌß€Ṃo

Try it online!
How it works
÷DfḶß€Ṃo  Main link. Argument: n

 D        Decimal; yield the digits of n.
÷         Divide n by each of its digits.
   Ḷ      Unlength; yield [0, ..., n-1].
  f       Filter; keep quotients that belong to the range.
    ß€    Recursively map this link over the resulting list.
      Ṃ   Take the minimum. This yields 0 if the list is empty.
       o  Logical OR; replace 0 with n.

Haskell, 67 61 bytes
f n=minimum$n:[f$div n d|d<-read.pure<$>show n,d>1,mod n d<1]

Try it online!
Explanation:

read.pure<$>show n transforms the input integer n into a list of digits.
For each digit d from this list, we check d>1 and mod n d<1, that is whether d divides n.
If the checks are successful, we divide n by d and recursively apply f: f$div n d.
Altogether, this yields a list of the minimal integers from all sub-trees of n.
As the list might be empty, we append n to it and return the minimum of the list.

Python 2, 59 bytes
f=lambda a:min([f(a/k)for k in map(int,`a`)if k>1>a%k]+[a])

Try it online!

Ruby, 52 47 bytes
Competing for the non-exotic languages group! (Note: a good idea, if not golfing, is to add .uniq after .digits because all similar branches have similar results)
f=->n{n.digits.map{|x|x>1&&n%x<1?f[n/x]:n}.min}

Try it online!
Explanation
f=->n{      # Function "f" n ->
   n.digits # n's digits (in reverse order (<- doesn't matter))
            # fun fact: all numbers always have at least one digit
    .map{|x|# Map function for every digit "x" ->
       x>1&&    # x is 2-9 and
       n%x<1    # n mod x == 0, or, "n is divisible by x"
       ? f[n/x] # then recursively find smallest of f[n/x]
       : n      # otherwise: n (no shortest path in tree)
     }.min  # Smallest option out of the above
            # if we reach a dead end, we should get n in this step
}

Can you use x<2|n%x?n:f[n/x] to save two or three bytes (depending on whether you need one | or two)?

@Neil Unfortunately, ruby treats value%zero as division by zero, so short-circuiting won't work. Also, 0 is a truthy value in ruby (the only falsey values are false and nil).

So would it work with two ||s?

Nope, because 0 is considered true, it would be with >0, but then it's the same char count.

Sorry, I'm not seeing where the 0 comes if you're not using |?

n%x would be a truthy value all the time.

Ah, right, thanks for clearing that up.

Common Lisp, 136 bytes
(defun f(n)(apply 'min(or(loop for z in(map'list #'digit-char-p(write-to-string n))if(and(> z 1)(<(mod n z)1))collect(f(/ n z)))`(,n))))

Try it online!
Readable version:
(defun f (n)
  (apply 'min
         (or (loop for z in (map 'list
                                 #'digit-char-p
                                 (write-to-string n))
                   if (and (> z 1)
                           (< (mod n z) 1))
                   collect (f (/ n z)))
             `(,n))))

Welcome to PPCG!

@Laikoni thanks! Not the smallest submission but still pretty fun one

@Laikoni my mistake, fixed. thank you!

@Arnauld thanks for noticing! I fixed the snippet and changed the link.

@Laikoni indeed! I got it down to 205b.

< z 2 instead of eq z 1 should save another byte.

Also <(mod n x)1.

JavaScript (Firefox 30-57), 49 bytes
f=n=>Math.min(...(for(c of''+n)c<2|n%c?n:f(n/c)))

ES6-compatible version, 52 bytes:

f=n=>Math.min(...[...''+n].map(c=>c<2|n%c?n:f(n/c)))
<input type=number oninput=o.textContent=f(this.value)><pre id=o>

Originally I tried filtering out irrelevant digits but it turns out to be slightly longer at 54 bytes:
f=n=>Math.min(n,...(for(c of''+n)if(c>1&n%c<1)f(n/c)))

Jelly, 21 bytes
Dðḍ>Ị{
DxÇ⁸:ß€µÇẸ$¡FṂ

Try it online!

Wolfram Language (Mathematica), 44 bytes
-7 bytes thanks to Misha Lavrov.
Min[#0/@(#/IntegerDigits@#⋂Range[#-1]),#]&

Try it online!

Somewhat golfier is this 44-byte solution based on using the ⋂ character for Intersection. But there are large cases it can no longer handle because it runs out of memory generating Range[#-1].

We can use Most@Divisors@# instead of Range[#-1] to avoid the memory issue, but the result is 49 bytes.

APL (Dyalog), 33 bytes
{⍬≡d←o/⍨0=⍵|⍨o←1~⍨⍎¨⍕⍵:⍵⋄⌊/∇¨⍵÷d}

Try it online!
How?
⍎¨⍕⍵ - grab digits of n
1~⍨ - excluding 1s
o/⍨ - filter by
0=⍵|⍨o - divisibility of n by the digit
⍬≡...:⍵ - if empty, return n
⌊/ - otherwise, return minimum of
∇¨ - recursion for each number in
⍵÷d - the division of n by each of the digits filtered above

Kotlin, 100 99 bytes
fun f(i:Int):Int{return i.toString().map{it.toInt()-48}.filter{it>1&&i%it<1}.map{f(i/it)}.min()?:i}

Beautified
fun f(i:Int):Int{
    return i.toString()
        .map { it.toInt()-48 }
        .filter { it >1 && i % it < 1}
        .map { f(i/it) }
        .min() ?: i
}

Test
fun f(i:Int):Int{return i.toString().map{it.toInt()-48}.filter{it>1&&i%it<1}.map{f(i/it)}.min()?:i}

val tests = listOf(
        1 to 1,
        7 to 1,
        10 to 10,
        24 to 1,
        230 to 23,
        234 to 78,
        10800 to 1,
        10801 to 10801,
        50976 to 118,
        129500 to 37,
        129528 to 257,
        8377128 to 38783,
        655294464 to 1111)

fun main(args: Array<String>) {
    for ( test in tests) {
        val computed = f(test.first)
        val expected = test.second
        if (computed != expected) {
            throw AssertionError("$computed != $expected")
        }
    }
}

Edits

-1 Mr. Xcoder

Jelly, 15 bytes
ÆDḊfD
:Çß€µÇ¡FṂ

Try it online!
I must admit that the ß€ part is borrowed from Erik's answer. The rest is developed separately, partly because I don't even understand how the rest of that answer works anyway :P.
How it works?
ÆDḊfD ~ Helper link (monadic). I'll call the argument N.

ÆD    ~ Take the divisors.
  Ḋ   ~ Dequeue (drop the first element). This serves the purpose of removing 1.
   fD ~ Take the intersection with the decimal digits.

:Çß€µÇ¡FṂ ~ Main link.

 Ç        ~ Apply the helper link to the first input.
:         ~ And perform element-wise integer division.
     Ç¡   ~ If the helper link applied again is non-empty*, then...
  ß€µ     ~ Apply this link to each (recurse).
       FṂ ~ Flatten and get the maximum.

*I am pleasantly surprised that ¡ works like that on lists, because its normal meaning is apply this n times.
After Dennis explained why ß€ doesn't need a conditional, we have this 12-byter, or his 8 byte version :P.

R, 101 98 bytes
f=function(x,e=(d=x%/%10^(0:nchar(x))%%10)[d>1])"if"(sum(y<-which(!x%%e)),min(sapply(x/e[y],f)),x)

Try it online!
A ton of bytes go into extracting the digits and which ones divide x; perhaps another approach is necessary.

Excel Vba, 153 bytes
First ever code-golf in the only language I know :(
Not exactly golf-friendly...
Function S(X)
S = X
For I = 1 To Len(CStr(X))
A = Mid(X, I, 1)
If A > 1 Then If X Mod A = 0 Then N = S(X / A)
If N < S And N > 0 Then S = N
Next I
End Function

Call like this:
Sub callS()

result = S(655294464)

MsgBox result

End Sub

I haven't a clue where to test this online.

Welcome to PPCG! I don't really know Vba but I suspect you can replace And N > 0  with a N = S on a previous line. (Also, if I had a way to test it my first instinct would be to check if any of the spaces can be removed.)

Perl 5, 87 + 1 (-p) = 88 bytes
$r=0,map{$\=$_,$r++if!$\|$_<$\;for$i(/[2-9]/g){$_%$i||$h{$_/$i}++}}$_,keys%h;$r&&redo}{

try it online

PHP, 120 bytes
<?php function f($n){$r=array_map(function($x)use($n){return$x>1&&!($n%$x)?f($n/$x):$n;},str_split($n));return min($r);}

Try it online!

Welcome to the site! :)

You can omit the opening PHP tags and save 6 bytes :-)

Pari/GP, 49 bytes
f(n)=vecmin([if(d<2||n%d,n,f(n/d))|d<-digits(n)])

Try it online!


text:
Flippign Lettesr Aroudn
In chat, we are often fast-typers and don't really look at the order of letters before posting a message. Since we are lazy, we need a program that automatically swaps the last two letters in our words, but since we don't want to respond too late, the code must be short.
Your task, if you wish to accept it, is to write a program that flips the last two letters of each word in a given string (so the word Thansk turns into Thanks). A word is a sequence of two or more letters in the English alphabet delimited by a single space.

The string / list of characters you receive as input is guaranteed to only contain alphabetic characters and spaces (ASCII [97 - 122], [65 - 90] and 32).

You can take input and provide output through any standard method, in any programming language, while taking note that these loopholes are forbidden by default.

The output may have one trailing space and / or one trailing newline.

The input will always contain words only (and the corresponding whitespace) and will consist of at least one word.

This is code-golf, so the shortest submission (scored in bytes), in each language wins!
Test cases
Note that the strings are surrounded with quotes for readability.

Input -> Output

"Thansk"                                 -> "Thanks"
"Youer welcoem"                          -> "Youre welcome"
"This is an apple"                       -> "Thsi si na appel"
"Flippign Lettesr Aroudn"                -> "Flipping Letters Around"
"tHe oDd chALlEneg wiht swappde lettesR" -> "teH odD chALlEnge with swapped letteRs"

Or, for test suite convenience, here are the inputs and their corresponding outputs separately:

Thansk
Youer welcoem
This is an apple
Flippign Lettesr Aroudn
tHe oDd chALlEneg wiht swappde lettesR

Thanks
Youre welcome
Thsi si na appel
Flipping Letters Around
teH odD chALlEnge with swapped letteRs

Thanks to DJMcMayhem for the title. This was originally a CMC.

May we output an array of words?

@Shaggy No, the output must be a string (or a list of characters by default)

May we request a trailing space on each input?

@FlipTack It was allowed in the initial version, but I have removed that rule before any of the answers that would use that had been posted. (partly because some users in chat told me I'm making this too easy otherwise, and I agree with them). No, it's not allowed.

Whta shoudl eb doen wiht oen lettre worsd liek "a"?

@Fabian A word is a sequence of two or more letters

V, 4 5 bytes
òeXp

Try it online!
|| denotes the cursor
The buffer starts with |w|ord and more words and the cursor being on the first character.
Recursively ò
go to the end of a word
wor|d| and more words
remove X the character to the left of the cursor
wo|d| and more words
paste it over the next character
wod|r| and more words
Implicit ending ò, repeat the same process for other words until the end of the buffer is reached

The right language for the task :)

Do you mean "Repeatedly" instead of "Recursively"?

@NieDzejkob The V wiki uses the word "recursively" to describe the ò command https://github.com/DJMcMayhem/V/wiki/Normal-Mode-Commands

Jelly, 7 bytes
Ḳœ?@€2K

A monadic link taking and returning lists of characters
Try it online!
How?
Ḳœ?@€2K - Link: list of characters
Ḳ       - split at spaces
     2  - literal two
    €   - for €ach:
   @    -   with sw@pped arguments:
 œ?     -     nth permutation (the 2nd permutation has the rightmost elements swapped)
      K - join with spaces

That's a nice abuse of permutations. Alternative

@Mr.Xcoder Ḳ2œ?Ð€K also works and uses a single quick.

Brain-Flak, 122 bytes
{(({})[((((()()){}){}){}){}])((){[()](<{}>)}{}){{}<>(({}({}))[({}[{}])])(<>)}{}({}<>)<>}<>(({}({}))[({}[{}])]){({}<>)<>}<>

Try it online!
The worst language for the job :)
Readable Slightly more readable version:
{
    (({})[((((()()){}){}){}){}])((){[()](<{}>)}{})

    {
        {}
        <>

        (({}({}))[({}[{}])])

        (<>)
    }
    {}

    ({}<>)<>

}<>

(({}({}))[({}[{}])])

{

    ({}<>)
    <>
}<>

I can't believe this is longer than the Brainfuck version...

@pureferret Brain-flak tends to be longer than brainfuck. Mostly cause it requires two bytes per primitive command, where brain-flak requires two.

Python 3, 50 bytes
print(*(w[:-2]+w[:-3:-1]for w in input().split()))

Try it online!
This answer abuses Python 3's behavior of print: Multiple arguments are printed with a single space between them. Of course, we can't just give it multiple arguments because we don't know how many words will be in the input. So we use  the splat operator. Basically
print(*[a,b,c])

is exactly the same thing as
print(a,b,c)

Abusing that makes a full program turn out shorter than a function/lambda where we'd have to use ' '.join or something similar.

Looks like Python 2 saves 2 bytes by writing for w in input().split():print w[:-2]+w[:-3:-1],. In Python 3, extracting the last two characters would work well with print(*(''.join(a)+c+b for*a,b,c in input().split())) except that a needs to be remade into a string.

Haskell, 40 bytes
(f=<<).words
f[a,b]=b:a:" "
f(x:r)=x:f r

Try it online! Usage example: (f=<<).words $ "abc xyz" yields "acb xzy ".

So you're telling me the shortest approach is both the approaches combined? >_<

Retina, 13 bytes
(.)(.)\b
$2$1

Try it online! Link includes test cases.

C,  62   58  54 bytes
Thanks to @Dennis for saving  four  eight bytes!
f(char*s){s[1]>32||(*s^=s[-1]^=*s^=s[-1]);*++s&&f(s);}

Try it online!

ah, the xor-based swap

How is s[-1] safe? I get how it works in the recursive runs (at the end after *++s), but on the first pass shouldn't it be undefined behavior?

Matlab (R2016b), 51 50 bytes
Saved 49 50 (!) bytes thanks to @Giuseppe.
function s(a),regexprep(a,'(\w)(\w)( |$)','$2$1 ')

And my previous answer:
Matlab (R2016b), 100 bytes
(Just for the fun of it :P)
function s(a),a=regexp(a,' ','split');for i=1:length(a),fprintf('%s ',a{i}([1:end-2 end end-1])),end

Explanation:
function s(a) % Defining as a function...
a=regexp(a,' ','split'); % Splits the input string at the spaces
for i=1:length(a) % Loops through each word
    fprintf('%s ',a{i}([1:end-2 end end-1])) % And prints everything with the last two characters swapped.
end

one character words can't happen, as a word is defined to be at least two characters.

would regexprep work here? Something like regexprep(a,'(\w*)(\w)(\w)','\1\3\2')?

D= This. Was. Epic! I think you should post this answer, since it's totally different from mine. The only thing is that Matlab references the matches with $1, and not \1, so it would be regexprep(a,'(\w*)(\w)(\w)','$1$3$2').

you should post it as a separate answer / in this answer; it's always good to see if a regex would help or not on a string challenge!
Besides, I clearly don't understand MATLAB's regex engine, so it wouldn't quite be fair for me to take credit for it.

Thanks a lot @Giuseppe! And it doesn't even break with the 1 letter words!

function s(a),regexprep(a,'(\w)(\w)( |$)','$2$1 ') is still another byte shorter!

Prolog (SWI), 60 bytes
[A,B]+[B,A].
[A,B,32|U]+[B,A,32|Y]:-U+Y,!.
[A|U]+[A|Y]:-U+Y.

Try it online!
Explanation
First we define the base case:
p([A,B],[B,A]).

This means that the last two letters will always be swapped.
Then we define what happens if we are right next to a space:
p([A,B,32|U],[B,A,32|Y]):-p(U,Y),!.

Two strings match if right before a space the letters before the space are swapped and the remainder if the strings match.  We then use ! to cut.
Our last case is if we are not next to a space the first two letters need to match.
p([A|U],[A|Y]):-p(U,Y).

R, 111 51 41 bytes
Courtesy of @Giuseppe, a regex approach which blows my old method out of the water.
cat(gsub("(.)(.)\\b",'\\2\\1',scan(,"")))

regex are much more efficient here: Try it online!

(not that I don't appreciate the guts it takes to do a pure string manipulation approach in R)

84 byte golf of your approach

@Giuseppe Wow, nice work! I've edited them into my answer, although if you'd prefer to make your own answer please go ahead!

nah, don't worry about it. I golfed down another 10 bytes: porting another regex approach, and a 70 byte of your old approach

Wolfram Language, 117 bytes
StringReplace[RegularExpression["\\b[[:alpha:]]{2,}\\b"]:>StringDrop[StringInsert["$0",StringTake["$0",{-1}],-3],-1]]

Try it online!
Applied to the test strings.
StringReplace[
  RegularExpression["\\b[[:alpha:]]{2,}\\b"] :>
   StringDrop[StringInsert["$0", StringTake["$0", {-1}], -3], -1]] /@
 {"Thansk", "Youer welcoem", "This is an apple",
  "Flippign Lettesr Aroudn", "tHe oDd chALlEneg wiht swappde lettesR"} // Column

Thanks
Youre welcome
Thsi si na appel
Flipping Letters Around
teH odD chALlEnge with swapped letteRs

Welcome to PPCG!

APL (Dyalog Classic), 28 bytes
1↓∊((¯2↓⊢),2↑⌽)¨' '(,⊂⍨⊣=,)⍞

⎕ML and ⎕IO are both 1,
Try it online!
Explanation

... (,⊂⍨⊣=,) ... Split (while keeping borders, and appending a border to the beginning) ...
... ⍞ ... the input ...
... ' ' ... ... at spaces.
... ( ... )¨ ... Then, to each element of that:

... , ... Concatenate ...
... (¯2↓⊢) ... ... every item except the last two ...
... 2↑⌽ ...  ... with the reverse of the last two elements.

1↓∊ ... Finally, return all but the first element of the flattened result.

return all but the first

Haskell, 45 bytes
-2 bytes thanks to H.PWiz.
(r.g.r=<<).words
g(x:y:z)=' ':y:x:z
r=reverse

Try it online!

Funky, 34 bytes
s=>s::gsub("(.)(.)( |$)","$2$1$3")

Try it online!

J, 20 19 11 bytes
Credit to @Bolce Bussiere
1&A.&.>&.;:

Try it online!
       &.;:      on words
    &.>          on each
  A.             apply the permutation
1&               number 1, swap the last two elements

13 Bytes with (1&A.&.>)&.;:

@BolceBussiere perfect

Could you add an explanation? Wondering if I can port it to K to reduce the embarrassing byte count of my solution!

Alice, 24 bytes
/0RR'.%$1\' o
\ix*o ne@/

Try it online!
Explanation
/...\' o
\.../

This forms a loop where the loop body is a linear Ordinal snippet and we execute ' o in Cardinal mode between every two loop iterations. The latter just prints a space.
Unfolding the zigzag structure of the Ordinal code, the linear loop body actually looks like this:
iR*' %e10xRo.n$@

Breaking this down:
i     Read all input. On subsequent iterations, this will push an empty string.
R     Reverse.
*     Join. On the first iteration, this joins the input to an implicit empty string,
      which does nothing. On subsequent iterations, it will join the empty string to
      the word on top of the string, thereby getting rid of the empty string.
' %   Split around spaces. On the first iteration, this will split the input
      into individual words. On subsequent iterations, this does nothing.
e10   Push "10".
x     Use this to permute the (reversed) word on top of the stack. In
      particular, the word is rearranged with the same permutation that is
      required to sort the string "10", which means the first two letters
      get swapped (which correspond to the last two letters of the actual
      word).
R     Reverse the swapped word.
o     Print it.
.n$@  If there are no words left on the stack, terminate the program.

Just noticed that the letter swap can be done in three bytes (h~Z) instead of four (e10x), but I'm not seeing a way to adjust the layout to actually save a byte overall with that.

brainfuck, 109 100 bytes
Edit: don’t have to handle one letter words
,[>++++[-<-------->],]>+[-<[>++++[<++++++++>-]<[->>+<<]<]<<[->>+<<]>[[-<+>]>]<<[>+>+>]-<]>>>>>>>[.>]

Try it online!
Prints a trailing space
How It Works
,[>++++[-<-------->],] Puts input on the tape and subtracts 32 from each character
                       This separates each word

>+[- Start the loop
   <[>++++[<++++++++>-]<[->>+<<]<] Add 32 to each letter of the word
                                   Skip this on the first iteration for the last word

   <<[->>+<<]>[[-<+>]>] Swaps the last two letters of the word
   <<[>+>+>]- If there is another word to the left continue loop
              Also set up to add a space to the end of the word
 <] End loop
 >>>>>>>[.>] Print the modified string

Previous version, 109 bytes
,[>++++[-<-------->],]>+[-<[>++++[<++++++++>-]<[->>+<<]<]<<[[->>+<<]>[[-<+>]>]<<[<]]>[>]<[>+>+>]-<]>>>>>>[.>]

Try it online!

QuadR, 8 bytes
..\b
⌽⍵M

Try it online!

Google Sheets, 33 Bytes
Anonymous worksheet function that takes input from cell A1 and outputs to the calling cell
=RegExReplace(A1,"(.)(.)\b","$2$1

-2 Bytes Thanks to @KevinCruijssen for the use of (.) over (\w)

Both (\w) can be golfed to (.) if I'm not mistaken. The \b is already an indication to look for words only. (Not entirely sure though, but it works in Java.)

@KevinCruijssen - You are absolutely correct, it can be. Thank you!

Julia 1.0, 30 bytes
!s=replace(s,r"..\b"=>reverse)

Try it online!
detect end of words with a regex r"..\b" and apply reverse on the matches

Curry, 33 bytes
Tested in both KiCS2 and PAKCS.
f(u++[x,y])=u++[y,x]
(>>=f).words

Curry's powerful patterns let it beat the Haskell answer!
To test it you can use Smap.  Just select KiCS2 2.2.0 or PAKCS 2.2.0 and paste the following complete code:
f(u++[x,y])=u++[y,x]
g=(>>=f).words
main=f "Hello world an happy day"

Haskell, 53 45 bytes
u[a,b]=[b,a]
u(a:b)=a:u b
unwords.map u.words

Try it online!
Explanation
u is a function that swaps the last two letters of a word.  To apply it to all the words we use words to split the list, map it across all of the words and then use unwords to put it back together.

You seem to have included the f= from TIO in your byte count, even though it's not included in your answer here.

How do you pass the input to your program? Does main=print$f"Hello World" not count to the program?

@Kritzefitz Thanks! I've adjusted it.

@DanFromGermany  My program makes a point-free function unwords.map u.words.  You call it like any other Haskell function. main=print$f"Hello World" does not count because my submission is a function and not a program.

05AB1E, 7 bytes
#vy`sðJ

Try it online!
-1 thanks to Magic Octopus Urn.
Prints one trailing space.

This is 11 bytes

@DanFromGermany No, 05AB1E has a code page in which this can be represented as 8 bytes.

Can you run the program represented in 8 bytes?

@DanFromGermany Yes, the 05AB1E interpreter can run this program from a file in the 05AB1E encoding.

@ETHproductions um, what?

@EriktheOutgolfer Uh, I 100% didn't mean to post that. Thought I hit cancel...

Try it online (7-bytes) if trailing spaces are allowed (can't use in-line code for that lol).

@MagicOctopusUrn yes, one trailing space is allowed

I didn't know s worked like that on lists, weird.

@MagicOctopusUrn It's not a list though, it's after ```.

@EriktheOutgolfer is flatten to stack? Wow, I've only ever used~` cause I thought they were one-and-the-same.

Perl 5, 19 + 1 (-p) = 20 bytes
s/(\w)(\w)\b/$2$1/g

Try it online!

Nice solution! Came up with very similar (but using -040). You can use (.) instead of (\w) as the input will only ever have letters to save 2. If using -040 you can also reaplace \b with $ and, using ; instead of /, drop /g: Try it online!

PHP, 119 107 bytes
Edit: thanks to totallyhuman

<?php foreach(explode(" ",trim(fgets(STDIN)))as$w)echo substr($w,0,strlen($w)-2).strrev(substr($w,-2))," ";

Try it online!

Can't you make $word a single character variable name?

@totallyhuman Yup! I wrote the full version and then compressed it, but didn't notice that. Thanks you.

PHP open tags can be omitted in the answer saving you 6 bytes.

I wonder if fgets(STDIN) can be omitted or replaced by $x too, like not all answers do count the input to their answers

trim() should be unnecessary.

sed, 20 17+1 (-r) = 18 bytes
s/(.)(.)\b/\2\1/g

Try it online!

The TIO link does not match your posted code.  The TIO link is a few bytes longer.

Whoops, fixed the link

You can remove |$. It's not doing anything. (For it to do what you expect you'd need (.)(.)(\b|$), but that's not necessary because \b already matches the end of the string.)

Whoops, meant to get rid of that. Thanks,

Haskell, 41 bytes
foldr(%)" "
a%(b:' ':r)=b:a:' ':r
a%s=a:s

Try it online!
Outputs with a trailing space.
The repeated ' ':r looks wasteful. But a%(b:t@(' ':r))=b:a:t is the same length and a%(b:t)|' ':_<-t=b:a:t is one byte longer.

Haskell, 41 bytes
f(a:b:t)|t<"A"=b:a:f t|1>0=a:f(b:t)
f e=e

Try it online!

JavaScript (Node.js), 38 36 32 bytes
s=>s.replace(/(.)(.)( |$)/g,"$2$1 ")
s=>s.replace(/(.)(.)\b/g,"$2$1")

Try it online!
RegExp approach courtesy @Giuseppe (although I thought of this independently), assuming words separated by only one space
-2 for only considering 1 space and add trailing space
-4 Thanks @Shaggy

Doesn't matter if there are more spaces, I think

@l4m2 But if there are more spaces then it will become a 38 for s=>s.replace(/(.)(.)( +|$)/g,"$2$1$3").

@l4m2 BTW my original answer was s=>s.replace(/(.)(.)(\s|$)/g,"$2$1$3")

ab abc  abcd   abcde    abcdef      does ab_, bc_, cd_, de_, ___, ef_, ___

@l4m2 Oh that's indeed true ;) (although I only see one space between every word)

F=s=>s.replace(/(.)(.)(?!\w)/g,"$2$1") same length

32 bytes: s=>s.replace(/(.)(.)\b/g,"$2$1") (Or 34 bytes without grouping: s=>s.replace(/..\b/g,([x,y])=>y+x))

PHP, 65 bytes
requires PHP 7.1 (or later)
for(;$s=$argv[++$i];$s[-1]=$s[-2],$s[-2]=$c,print"$s ")$c=$s[-1];

takes sentence as separate command line arguments. Run with -nr.

working on a single string, 77+1 bytes:
foreach(explode(" ",$argn)as$s){$c=$s[-1];$s[-1]=$s[-2];$s[-2]=$c;echo"$s ";}

Run as pipe with -nR.

...  or try them online.

K (oK), 23 22 bytes
" "/{x@prm[!#x]1}'" "\

Try it online!
Example:
" "/{x@prm[!#x]1}'" "\"Hello World"
"Helol Wordl"

Explanation:
Port of FrownyFrog's solution to save 1 byte.
I'll come back to this.
" "/{prm[x]1}'" "\ / the solution
              " "\ / split input on " "
    {       }'     / apply lambda to each
     prm[x]        / permute input x
           1       / and take the 2nd result
" "/               / join with " "

Previous solution:

" "/-2{(x_y),|x#y}'" "\ 23 bytes

Java 8, 35 bytes
s->s.replaceAll("(.)(.)\\b","$2$1")

Port of @TaylorScott's Google Sheets answer, after I golfed two bytes. EDIT: I see it's now a port of Neil's Retina answer after my two golfed bytes.
Explanation:
Try it online.
s->                           // Method with String as both parameter and return-type
   s.replaceAll("(.)(.)       //  Replace any two characters,
                       \\b",  //  with a word-boundary after it (space or end of String)
                "$2$1")       //  With the two characters swapped

Vyxal S, 5 bytes
⌈ƛ÷$Ṡ

Try it Online!
-2 thanks to Aaron Miller.

5 bytes

Ly, 30 bytes
i00I[rpr' =[ppf' 0]p0I]pfrp[o]

Try it online!
This one reads all the input into the stack, then copies characters one at a time to the other end of the stack (with a null separator between the original and the "fixed" codepoints).  Anytime a space it found, it reverse the position of the previous two codepoints.
When the loop hits the null separator it end, then the just prints the stack.
i00I[rpr' =[ppf' 0]p0I]pfrp[o]
i0                              # Read all the input, then push a null
  0I                            # Copy the bottom of the stack to the top
    [                 ]p        # Loop until the null reaches the bottom of the stack
     rpr                        # Reverse, pop, reverse (delete bottom of the stack)
                    0I          # Copy the bottom of the stack to the top
        ' =                     # Is the codepoint " "?
           [p    0]p            # If-then, runs if codepoint is " "
             pf'                # Delete " ", flip two entries, add " " back
                        f       # End of input, flip the last two codepoints
                         rp     # Reverse stack, delete null
                           [o]  # Print the stack as characters

Lexurgy, 24 bytes
This kind of challenge is one of the canonical reasons for captures in Lexurgy to exist (for things like metathesis and reduplication).
Capture 2 of any character, and swap their order when they are at the end of a "word".
a:
[]$1 []$2=>$2 $1/_ $

Jelly, 10 bytes
ḲṪ,¥\€Ḋ€UK

Try it online!

SNOBOL4 (CSNOBOL4), 136 119 bytes
	I =INPUT
B	I SPAN(&LCASE &UCASE) . Y ARBNO(' ') =:F(O)
	Y RPOS(2) REM . Z =REVERSE(Z)
	O =O Y ' '	:(B)
O	OUTPUT =O
END

Try it online!
Prints with a trailing space. You know you've done something wrong when a language is a backronym for StriNg Oriented and symBOlic Language and your code is longer than Brain-Flak :( now it's slightly better.
Line B takes I and replaces (alphabetic characters saved as Y)(some number of spaces) with the empty string.
The following line extracts the last 2 characters of Y as Z and replaces them as Z reversed, then the next line concatenates O, Y, and a single space character.
Finally, it prints when I no longer matches the required pattern in line B.

Clean, 75 59 bytes
-16 from Laikoni
@[a,b]=[b,a]
@[a,b,' ':c]=[b,a,' ': @c]
@[a:b]=[a: @b]
@e=e

Try it online!

This seems to work fine without import StdEnv.

Also moving @[]=[] to the bottom and replacing it by @e=e saves two more bytes: Try it online!

Standard ML (MLton), 92 77 bytes
implode o foldr(fn(a,b:: #" "::r)=>b::a:: #" "::r|(a,r)=>a::r)[#" "]o explode

Try it online! Based on xnor's Haskell solution.

Previous 92 byte version
fun f(a::b:: #" "::r)=b::a:: #" "::f r|f(x::r)=x::f r|f r=r
fun$s=implode(f(explode(s^" ")))

Try it online! Example usage: $ "Flippign Lettesr Aroudn" yields "Flipping Letters Around ".
Ungolfed
fun f (a :: b :: #" " :: r) = b :: a :: #" " :: f r
  | f              (x :: r) = x :: f r
  | f                    r  = r

fun g s = implode (f (explode (s ^ " ")))

Try it online!

Japt -S, 7 6 bytes
A port of Jonathan's Jelly solution.
¸Ëá ÅÎ

Try it
¸Ëá ÅÎ     :Implicit input of string
¸          :Split on spaces
 Ë         :Map
  á        :  Permutations
    Å      :  Slice off the first element
     Î     :  Get the first element
           :Implicit output joined with spaces

Wolfram Language (Mathematica), 72 bytes
x""<>(Characters[StringSplit@x][[;;,#]]&/@{;;-3,-1,-2})~Riffle~" "

Try it online!
Another approach using manipulation of character list and take parts instead of string regex.
The two Unicode characters are \[Function] and \[Transpose] in private use area of Mathematica, take 3 bytes each.
74 bytes
Try it online!

Excel VBA, 78 Bytes
Anonymous VBE immediate window that takes input from range A1 and outputs to the VBE immediate window.
For Each s in Split([A1]):l=Len(s):?Left(s,l-2)Right(s,1)Mid(s,l-1,1)" ";:Next

Ruby, 53 bytes
$*.each{|x|print x[0,x.length-2]+x[-2,2].reverse," "}

The program takes input through command line arguments (formatted as a regular sentence, without quotes).
$* is a shorthand for ARGV, therefore i can iterate over each of the words, already in an array.
Only thing that bugs me is that awful x.length-2 snippet. I would prefer to use x.last(-2), but i believe that is only in RoR.
Called like:
ruby file.rb Helol Wordl

So that each word becomes a parameter. (Not wrapped in quotes)

Doesn’t return the correct results for me. The letters aren’t swapped on all the words.

@Mr.Xcoder It is because TIO passes the argument in quotes :) Add a argument for each word, and it works

This works, in practice, atleast on windows you can pass arguments without quotes, hence you can type it as if you typed a regular sentence

Clojure, 122 117 bytes
-5 bytes by shortcutting the indices of the characters to swap
(fn[p](map #(let[l(count %)v(vec %)y(dec l)z(- l 2)](apply str(assoc v y(v z)z(v y))))(clojure.string/split p #" ")))

It's a shame that most of Clojure's String function are tucked away inside of Clojure.string, and that there are no good ways of manipulating the characters of Strings directly. clojure.string/split is atrociously long, and the conversion to-and-from vectors added quite a lot. I might be able to shave off a couple bytes by shortcutting the trailing indices, but this is the only decent algorithm I could think of.
(defn flip-last [phrase]
  (let [words (clojure.string/split phrase #" ")]

    ; For each word...
    (map #(let [len (count %)
                ; Need to turn the string into a vector so we can manipulate it using indices
                vec-word (vec %)]

            ; ... then turn the vector of characters back into a String.
            (apply str
               ; Associate the element at the second last index with the element at the last index,
               ;  and vice-versa...
              (assoc vec-word (dec len) (vec-word (- len 2))
                              (- len 2) (vec-word (dec len)))))

         words)))

QuadR, 8 bytes
..\b
⌽⍵M

Try it online!
..\b any two characters followed by a word boundary
gets replaced with
⌽⍵M the reverse of the Match

Equivalent to the following 18-byte Dyalog APL function:
'..\b'⎕R{⌽⍵.Match}

PHP4 (48 chars)
Given $argv[1] as a command line argument :
echo preg_replace('#(.)(.)\b#','$2$1',$argv[1]);

PHP7.4 (48 chars)
The function $f is inverting the last two chars of every word :
$f=fn($s)=>preg_replace('#(.)(.)\b#','$2$1',$s);

Try it Online - Usage :
echo $f('Flippign Lettesr Aroudn');

Both versions are using 's PCRE Text Processing Functions.
Info: Support for PHP4 has been discontinued since 2008 but same code still works in PHP8.1.
Mathematica (58 chars)
f=StringReplace[#,RegularExpression["(.)(.)\\b"]:>"$2$1"]&

Try it online

Factor, 50 bytes
[ " "split [ 2 cut* reverse append ] map " "join ]

Try it online!
Factor's regular expressions don't support backreferences for philosophical reasons, so here's (possibly) the next best thing. It splits the input on spaces, applies a quotation to each word, and joins them with a space into a single string. Here's how the mapping quotation works:
          ! "Flipping"
2 cut*    ! "Flippi" "ng"
reverse   ! "Flippi" "gn"
append    ! "Flippign"