Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 3:dd0e559a9ff7, committed 2017-07-11
- Comitter:
- sgnezdov
- Date:
- Tue Jul 11 21:48:11 2017 +0000
- Parent:
- 2:4fe42e3bafe4
- Child:
- 4:c40e9bb559a5
- Commit message:
- run once job runs once and terminates application (good)
Changed in this revision
| JobScheduler.lib | Show annotated file Show diff for this revision Revisions of this file |
| source/main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/JobScheduler.lib Tue Jul 11 20:35:35 2017 +0000 +++ b/JobScheduler.lib Tue Jul 11 21:48:11 2017 +0000 @@ -1,1 +1,1 @@ -JobScheduler#9bf5366ad5a2 +JobScheduler#f08f55827736
--- a/source/main.cpp Tue Jul 11 20:35:35 2017 +0000
+++ b/source/main.cpp Tue Jul 11 21:48:11 2017 +0000
@@ -19,29 +19,13 @@
scheduler.Start();
time_t nowSecs = time(NULL);
- scheduler.JobAdd(1, new JobScheduler::RunOnceSchedule(nowSecs + 5), NULL);
+ JobScheduler::Response<JobScheduler::JobID> res = scheduler.JobAdd(1, new JobScheduler::RunOnceSchedule(nowSecs + 5), NULL);
+ printf("job add response error: %d, jobID: %d\n", res.error, res.data);
wait(5);
scheduler.Stop();
scheduler.WaitToStop();
}
-void useTime()
-{
- //set_time(1256729737); // Set RTC time to Wed, 28 Oct 2009 11:35:37
-// while (true) {
-//
-// printf("Time as seconds since January 1, 1970 = %d\n", seconds);
-//
-// printf("Time as a basic string = %s", ctime(&seconds));
-//
-// char buffer[32];
-// strftime(buffer, 32, "%I:%M %p\n", localtime(&seconds));
-// printf("Time as a custom formatted string = %s", buffer);
-//
-// wait(1);
-// }
-}
-
int main()
{
printf("\nJob Scheduler Demo\n");