/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to tools.c

  • Committer: Suren A. Chilingaryan
  • Date: 2011-12-12 14:27:13 UTC
  • Revision ID: csa@dside.dyndns.org-20111212142713-xwpcvv6j5d3zmnvx
Minor fixes and improvements

Show diffs side-by-side

added added

removed removed

Lines of Context:
332
332
    pcilib_timeout_t duration;
333
333
 
334
334
    duration = pcilib_calc_time_to_deadline(tv);
335
 
    wait.tv_sec = duration / 1000000;
336
 
    wait.tv_nsec = 1000 * (duration % 1000000);
337
 
    nanosleep(&wait, NULL);
 
335
    if (duration > 0) {
 
336
        wait.tv_sec = duration / 1000000;
 
337
        wait.tv_nsec = 1000 * (duration % 1000000);
 
338
        nanosleep(&wait, NULL);
 
339
    }
338
340
 
339
341
    return 0;
340
342
}