killall-q on DeviantArthttp://creativecommons.org/licenses/by-nc-sa/3.0/https://www.deviantart.com/killall-q/art/T-Minus-469722225killall-q

Deviation Actions

killall-q's avatar

T-Minus

By
Published:
78.1K Views

Description

Clock/countdown/stopwatch with accurate milliseconds display.

Features


  • Switch between time and timer without losing running timer
  • Persistent timer runs even while skin is unloaded
  • Countdown (T-minus) seamlessly converts to stopwatch (T-plus) on expiry
  • Resizable
  • 40 frames per second

Usage


  • Click MODE (bottom left corner) to switch mode.
  • Scroll over SIZE (top left corner) to adjust size.
  • Scroll over timer display to adjust T-minus zero.

  • To countdown/up to an exact date/time, convert it to a Unix timestamp in seconds and overwrite the "Zero" variable in "T-Minus/<at>Resources/Settings.inc" (right-click on the T-Minus skin and click "T-Minus" at the top to open the skin's folder), then refresh the skin.

How Does It Work?


The Lua function os.clock() provides the seconds since program start, accurate to the millisecond. On startup, the Lua script stays in a busy loop until the current second changes. It then stores the os.clock() offset from the time in seconds, and uses this to get the millisecond time.




CHANGELOG

[2021.11.01]
- Added beep sound on transition from countdown to countup.

[2017.10.24]
- Changed default color scheme to have transparent background.

[2016.01.30]
- Fixed an accumulating error with persistence.

[2016.01.28]
- Persistent timer: Timer continues to run through refreshes, while skin is unloaded, or computer is off.
Comments10
Join the community to add your comment. Already a deviant? Log In
TheDharevCat's avatar

I've been looking for something like this for an unreasonable amount of time, thank you very much!