Calculate mac sleep/idle time

I want to calculate the duration the mac is sleeping, so that when it wakes I can get a notification telling the time in "hour+minute" format.

Is there a macro that can do this ?

You can get the time of sleep and wake using the Sleep and Wake triggers and the SECONDS function. You can break it down in to hours minutes and seconds and reassemble it as a time in h:mm format, or you can cheat a little and use the token:

1 Like

thanks, i got it to work with these 2 macros:
sleep.kmmacros (1.3 KB)

wake.kmmacros (1.7 KB)