char errstr[1000];
if (r == ETIMEDOUT)
debug(debuglevel,
- "timed out waiting for a mutex, having waiting %f seconds, with a maximum "
+ "timed out waiting for a mutex, having waited %f microseconds, with a maximum "
"waiting time of %d microseconds. \"%s\".",
- (1.0 * et) / 1000000000, dally_time, debugmessage);
+ (1.0E6 * et) / 1000000000, dally_time, debugmessage);
else
debug(debuglevel, "error %d: \"%s\" waiting for a mutex: \"%s\".", r,
strerror_r(r, errstr, sizeof(errstr)), debugmessage);
result = pthread_mutex_lock(mutex);
uint64_t time_delay = get_absolute_time_in_ns() - time_at_start;
debug(debuglevel,
- "mutex_lock \"%s\" at \"%s\" expected max wait: %0.9f, actual wait: %0.9f sec.",
- mutexname, dstring, (1.0 * dally_time) / 1000000, 0.000000001 * time_delay);
+ "mutex_lock \"%s\" at \"%s\" expected max wait: %0.9f, actual wait: %0.9f microseconds.",
+ mutexname, dstring, (1.0 * dally_time), 0.001 * time_delay);
}
pthread_setcancelstate(oldState, NULL);
return result;
char *get_version_string(); // mallocs a string space -- remember to free it afterwards
-void sps_nanosleep(const time_t sec,
- const long nanosec); // waits for this time, even through interruptions
-
int64_t generate_zero_frames(char *outp, size_t number_of_frames, sps_format_t format,
int with_dither, int64_t random_number_in);