
We recently ran into problems with some game machines that were hooked up to multiple time synchronization systems at
once. These time systems were set a few minutes apart from each other and would fight to set the game machine’s clock
forwards or backwards at odd intervals throughout the day. Casino game machines run 24-7 and are expected to not crash or
misbehave.
Unfortunately one external system based its own calculations off of the system clock so this mysterious “time warp” caused
problems. If a game was actually in play when the time changed in the background, havoc ensued. There could be other
external systems written in a similar manner, so a script to reproduce this problem is valuable.
We wrote a Lua script to simulate these time adjustments and would like to ask you to write a time-adjustment routine as a
written test. We don’t expect your work to be written in Lua, or even be in a running state. “Pseudocode” will even work for the
purpose of this test, and you have the ability to work in any of these mediums (or combination thereof) you choose:
1) A standard Lua editor
2) A text file
3) A Word document (for example: a bulleted outline)
4) Writing Utensil and Paper
Time is given to you through code in terms of Year, Day of the Year, Month, Day, Hour, Minutes, Seconds format. You are
expected to submit time back to Windows through DOS commands. Manual pages are listed below this description. You can
concatenate (combine) strings together through Lua and issue them as DOS commands.
We will evaluate your written work primarily on the following criteria:
Is your work easy to follow?
How did you find your solution?
How versatile is your work?
Is your method considerate of real world situations?