Incurable
2014-10-12 23:38:13
Hi,
I want to get the current system time in a format that can be used to take a break when the system time is equal to a certain time to simulate realistic human sleep in an extended script run. For example, the current system time is 10:00pm so the script takes a 6-8 hour sleeping break, then adds an additional period of time (say 30-60 minutes) for the usual morning routine of most humans.
I know that you can simulate sleep via a long break after a long amount of time, but I'd like to simulate it based on the users time-zone, not just how long the script has been running. Realistically, a player isn't going to play for 8 hours at 2:00am before taking a 6 hour break and coming back online at 4:00pm.
A brief forum search didn't return anything that I found useful, though I may have been searching for the wrong things.
Cheers.
I want to get the current system time in a format that can be used to take a break when the system time is equal to a certain time to simulate realistic human sleep in an extended script run. For example, the current system time is 10:00pm so the script takes a 6-8 hour sleeping break, then adds an additional period of time (say 30-60 minutes) for the usual morning routine of most humans.
I know that you can simulate sleep via a long break after a long amount of time, but I'd like to simulate it based on the users time-zone, not just how long the script has been running. Realistically, a player isn't going to play for 8 hours at 2:00am before taking a 6 hour break and coming back online at 4:00pm.
A brief forum search didn't return anything that I found useful, though I may have been searching for the wrong things.
Cheers.