Changeset 5d557e747257b9a91c7870bfda3448f767b74f14

Show
Ignore:
Timestamp:
01/30/09 04:59:59 (5 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1233291599 +0000
git-parent:

[8ea07be0a527c4fb8256ad375157caee1f2d1bdc]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1233291599 +0000
Message:

set offset to zero if the check is NP_TRANSIENT, closes #75

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noit_check.c

    r5247186 r5d557e7  
    8585  struct timeval now, period; 
    8686  double r; 
    87   int offset, max; 
    88  
    89   r = drand48(); 
    90   max = noit_check_max_initial_stutter(); 
    91   offset = r * (MIN(max, check->period)); 
     87  int offset = 0, max; 
     88 
     89  if(!(check->flags & NP_TRANSIENT)) { 
     90    r = drand48(); 
     91    max = noit_check_max_initial_stutter(); 
     92    offset = r * (MIN(max, check->period)); 
     93  } 
    9294  period.tv_sec = (check->period - offset) / 1000; 
    9395  period.tv_usec = ((check->period - offset) % 1000) * 1000;