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.


Origin commit data
------------------
Branch: ni/coolstream
Commit: 99ff4857ff
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2017-09-23 (Sat, 23 Sep 2017)



------------------
This commit was generated by Migit
This commit is contained in:
Stefan Seyfried
2017-09-23 21:35:01 +02:00
parent 19da7a493f
commit 267ba4b9f4
11 changed files with 40 additions and 36 deletions

View File

@@ -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;