Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Real-Time System
#7
why keep saving the time and date to a file when it could easily be stored into memory... all you have to do is keep it in memory? :S

from what I see here you're writing to an ini file every minute which is just waste of CPU when it could store as 3 bytes in memory (hour min second)...

...just use a timer and make it update every 1000ms... (Interval = 1000), and make it get the server system clock data.... and if it's a certain number in hours or w.e. then it's day, else it's night

that's how MT's day/night system works, and it works flawlessly....
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)