Commit Graph

10 Commits

Author SHA1 Message Date
Markus Ewald
2b94c316f6 Split Scheduler class into two files, one containing only the static time source management code (which I might decide to put somewhere else after all); added an option for users of the scheduler to query the scheduler's time source; fixed typo
git-svn-id: file:///srv/devel/repo-conversion/nusu@191 d2e56fa2-650e-0410-a79f-9358c0239efd
2010-03-03 20:47:45 +00:00
Markus Ewald
237fb57fc8 Added an interface for the scheduler service (this might be once candidate for replacement by different implementations); added a new helper class for the StringBuilder that allows garbage-free appending of integers and floats; added unit tests for most of the code
git-svn-id: file:///srv/devel/repo-conversion/nusu@188 d2e56fa2-650e-0410-a79f-9358c0239efd
2010-02-11 21:07:04 +00:00
Markus Ewald
f8adca9e17 Fixed a glaring bug in the Scheduler causing errors when the scheduler's last item in the queue is cancelled
git-svn-id: file:///srv/devel/repo-conversion/nusu@152 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-06-22 18:14:45 +00:00
Markus Ewald
4fd22afcc0 Fixed two small typos
git-svn-id: file:///srv/devel/repo-conversion/nusu@149 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-06-15 20:15:43 +00:00
Markus Ewald
6d7f4d11af Minor cosmetic fix in comment
git-svn-id: file:///srv/devel/repo-conversion/nusu@148 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-06-09 19:49:55 +00:00
Markus Ewald
d6ddf04f58 On very quickly scheduled recurrent notifications, it was still possible for the wait time to become negative due to the passage of time - now the scheduler will only use the WaitOne() method when the remaining time until notification is positive
git-svn-id: file:///srv/devel/repo-conversion/nusu@147 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-06-09 19:47:30 +00:00
Markus Ewald
6b8362d57d Fixed a nasty bug that would make the scheduler queue notifications using their delay time as absolute notification time, causing negative numbers to be passed to WaitOne(); updated unit test to expose this problem if it happens
git-svn-id: file:///srv/devel/repo-conversion/nusu@146 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-06-09 19:41:38 +00:00
Markus Ewald
a6f7749121 Moved the checkForTimeAdjustment() method in the generic time source behind the WaitOne() call because that's the most likely point for a date/time adjustment will have occurred at; WindowsTimeSource now exists on the XBox 360 as well, but will throw in its constructor and report Available as false (this simplifies things in other places); Scheduler class is fully working and 100% testable with simulated time (instead of waiting for scheduled notifications to be delivered in real time, which would make testing slow); added unit tests for Scheduler class and reached 100% coverage
git-svn-id: file:///srv/devel/repo-conversion/nusu@145 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-06-09 19:28:11 +00:00
Markus Ewald
4b9002b520 Renamed DefaultTimeSource to GenericTimeSource; the generic time source will now detect when the system date/time is adjusted; made some progress on the Scheduler implementation; wrote some unit tests for the Scheduler class
git-svn-id: file:///srv/devel/repo-conversion/nusu@144 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-06-08 20:32:14 +00:00
Markus Ewald
2426868cce Improved comments in various places; disabled all classes in the 'Services' namespace, including the type listers; added scheduler class which will act sort of like the cron daemon on unix machines; defined a time source interface so I can manually advance time instead of waiting in the unit tests; created two time sources, a generic one for all platforms and a windows specific one that will notice when the system time is adjusted
git-svn-id: file:///srv/devel/repo-conversion/nusu@143 d2e56fa2-650e-0410-a79f-9358c0239efd
2009-06-04 19:32:15 +00:00