- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I am using the Eclipse IDE but i would like to reuse some arduino libraries so I am coding a few missing classes and functions.
Any suggestion about the best way to implement millis() ?
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I found a solution:
unsigned long millis(){
struct timespec tt;
clock_gettime(CLOCK_MONOTONIC, &tt);
return tt.tv_nsec/1000000+ tt.tv_sec * 1000;
}
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
I found a solution:
unsigned long millis(){
struct timespec tt;
clock_gettime(CLOCK_MONOTONIC, &tt);
return tt.tv_nsec/1000000+ tt.tv_sec * 1000;
}

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page