mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-08-27 15:32:59 +02:00
change time_monotonic_ms() from time_t to int64_t
time_monotonic_ms values did wrap every ~24 days, leading to problems in code that did not cope with that. Instead of fixing all places where relative comparisons with time_monotonic_ms() are made, just use a bigger datatype. Convert all users to the new type.
This commit is contained in:
committed by
Jacek Jendrzej
parent
c7f429019d
commit
8dad062eff
@@ -486,12 +486,12 @@ void *insertEventsfromFile(void * data)
|
||||
std::string epg_dir = (char *) data;
|
||||
indexname = epg_dir + "index.xml";
|
||||
|
||||
time_t now = time_monotonic_ms();
|
||||
int64_t now = time_monotonic_ms();
|
||||
xmlDocPtr index_parser = parseXmlFile(indexname.c_str());
|
||||
|
||||
if (index_parser == NULL) {
|
||||
readEventsFromDir(epg_dir, ev_count);
|
||||
printf("[sectionsd] Reading Information finished after %ld milliseconds (%d events)\n",
|
||||
printf("[sectionsd] Reading Information finished after %" PRId64 " milliseconds (%d events)\n",
|
||||
time_monotonic_ms()-now, ev_count);
|
||||
reader_ready = true;
|
||||
pthread_exit(NULL);
|
||||
@@ -515,7 +515,7 @@ void *insertEventsfromFile(void * data)
|
||||
|
||||
xmlFreeDoc(index_parser);
|
||||
printdate_ms(stdout);
|
||||
printf("[sectionsd] Reading Information finished after %ld milliseconds (%d events)\n",
|
||||
printf("[sectionsd] Reading Information finished after %" PRId64 " milliseconds (%d events)\n",
|
||||
time_monotonic_ms()-now, ev_count);
|
||||
|
||||
reader_ready = true;
|
||||
|
Reference in New Issue
Block a user