Some machines - notably laptops - have difficulty with this (my laptop is convinced it has an uptime of over 7 days, despite being shutdown and unplugged last night, and started again this morning. Event viewer reveals that it is convinced it was just in a low-power state overnight!
Servers should be OK though.
A quick look at
properties of type "operating system"
shows a few candidates
q: uptime of operating system
A: 7 days, 17:02:50.078
T: 0.546 ms
q: boot time of operating system
A: Thu, 19 Aug 2021 17:07:17 +0100
T: 0.494 ms
Juggling things slightly, we can compare the current time to boot time (and arrive at a value consistent with the uptime property). We can also cast the value to a chosen unit of time
q: now - boot time of operating system
A: 7 days, 17:02:49.578
T: 0.447 ms
q: (now - boot time of operating system) / minute
T: 0.409 ms
and then use that to decide whether our uptime meets our criteria
q: 15 < (now - boot time of operating system) / minute
T: 0.461 ms
However, use with caution. You need an additional indicator to know that reboot#1 has occurred and reboot#2 is pending. You won’t make many friends by causing a server to endlessly reboot every 15 minutes…