Changeset 4677:1a402c6e621a in roaraudio


Ignore:
Timestamp:
12/21/10 16:53:34 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

optimize a bit the number how often time() is called at nonce generation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/random.c

    r4674 r4677  
    6565 size_t i, writelen; 
    6666 void * off = buf; 
     67#ifdef ROAR_HAVE_TIME 
     68 volatile uint32_t now = time(NULL); 
     69#endif 
    6770 
    6871 roar_random_init(); 
     
    8689 
    8790#ifdef ROAR_HAVE_TIME 
    88   buf[12] += time(NULL); 
     91  buf[12] += now; 
    8992#endif 
    9093 
Note: See TracChangeset for help on using the changeset viewer.