Problem
#34328 switched uptime to use monotonic time, but g_startup_time was a function-local static in GetUptime(), meaning it was initialized on first call rather than at program start.
This caused the first uptime RPC to always return 0.
Fix
Move g_startup_time to namespace scope so it initializes at program start, ensuring the first uptime() call returns actual elapsed time.
Reproducer
Revert the fix and run the test or alternatively:
cmake -B build && cmake --build build --target bitcoind bitcoin-cli -j$(nproc)
./build/bin/bitcoind -regtest -daemon
sleep 10
./build/bin/bitcoin-cli -regtest uptime
./build/bin/bitcoin-cli -regtest stop
<details> <summary>Before (uptime is initialized on first call)</summary>
Bitcoin Core starting
0
Bitcoin Core stopping
</details>
<details> <summary>After (first uptime call is in-line with sleep)</summary>
Bitcoin Core starting
10
Bitcoin Core stopping
</details>
Fixes #34423, added reporter as coauthor.