Get Uptime from Router in number

I want to get “Uptime” in variable and compare!

:local uptime [/system resource get uptime]
:log info $uptime
:if ($uptime > … ) do={
:log info “yes”
} else {
:log info “no”
}

Maybe the variable is in string and the compare is not success!
How to convert?

[Sebastian@firewall] > :put [:typeof  [/system resource get uptime ]]
time

=> time object