struct timeval t, void *private_data)
{
const char *binary_name = (const char *)private_data;
- struct timeval tv;
- struct timezone tz;
- if (gettimeofday(&tv, &tz) == 0) {
- DEBUG(0,("%s: maximum runtime exceeded - terminating, current ts: %d\n", binary_name, (int)tv.tv_sec));
- } else {
- DEBUG(0,("%s: maximum runtime exceeded - terminating\n", binary_name));
- }
+ DEBUG(0,("%s: maximum runtime exceeded - terminating, current ts: %d\n", binary_name, time(NULL)));
exit(0);
}
discard_const(binary_name));
if (max_runtime) {
- struct timeval tv;
- struct timezone tz;
-
- if (gettimeofday(&tv, &tz) == 0) {
- DEBUG(0,("Called with maxruntime %d - current ts %d\n", max_runtime, (int)tv.tv_sec));
- } else {
- DEBUG(0,("Called with maxruntime %d\n", max_runtime));
- }
+ DEBUG(0,("Called with maxruntime %d - current ts %d\n", max_runtime, time(NULL)));
tevent_add_timer(event_ctx, event_ctx,
timeval_current_ofs(max_runtime, 0),
max_runtime_handler,