Lines Matching refs:now
47 static int fifolog_write_gzip(struct fifolog_writer *f, time_t now);
106 time_t now;
112 time(&now);
113 fifolog_write_gzip(f, now);
125 time_t now;
174 time(&now);
175 f->starttime = now;
176 f->lastsync = now;
177 f->lastwrite = now;
189 fifolog_write_output(struct fifolog_writer *f, int fl, time_t now)
200 be32enc(f->obuf + h, now);
233 f->cnt[FIFOLOG_PT_RUNTIME] = now - f->starttime;
235 f->lastwrite = now;
264 fifolog_write_gzip(struct fifolog_writer *f, time_t now)
268 assert(now != 0);
269 if (f->cleanup || now >= (int)(f->lastsync + f->syncrate)) {
273 } else if (now >= (int)(f->lastwrite + f->writerate)) {
288 i = fifolog_write_output(f, fl, now);
300 f->lastsync = now;
312 fifolog_write_poll(struct fifolog_writer *f, time_t now)
315 if (now == 0)
316 time(&now);
317 return (fifolog_write_gzip(f, now));
326 fifolog_write_record(struct fifolog_writer *f, uint32_t id, time_t now,
348 if (now == 0)
349 time(&now);
351 if (now != f->last)
359 be32enc(buf + bufl, (uint32_t)now);
375 f->last = now;
386 fifolog_write_record_poll(struct fifolog_writer *f, uint32_t id, time_t now,
393 if (now == 0)
394 time(&now);
401 if (!fifolog_write_record(f, id, now, ptr, len)) {
402 if (fifolog_write_gzip(f, now) < 0)
405 if (!fifolog_write_record(f, id, now, ptr, len))
413 while (!fifolog_write_record(f, id, now, p, l))
414 if (fifolog_write_gzip(f, now) < 0)
418 if (fifolog_write_gzip(f, now) < 0)