Detecting how much time has passed when player sleeps or skips time

I need to detect if the player skips time. I have some basic idea of how this could be done, but I want some insight on how I can do this and some tips to optimize it. I think that I can have a scoreboard called TrackTime. I will have fake players called .Time, which keeps track of time, and .OldTime, which keeps track of the previous time. If there is a significant difference between these two, we want to record the amount of time skipped in a fake player called .SkippedTime. .Skipped Time resets to zero every tick after the execution. This gives other functions enough time to record the result. A good way to test this functionality is by using the "/time add" command. Thanks!
Continue to help post