Get system timestamp less often (only after sleeping/selecting)

This commit is contained in:
Keith Winstein
2012-07-26 20:54:19 -04:00
parent 5e3ec2e037
commit a744004bf6
7 changed files with 150 additions and 44 deletions
+2
View File
@@ -57,6 +57,7 @@
#include "fatal_assert.h"
#include "locale_utils.h"
#include "select.h"
#include "timestamp.h"
#include "networktransport.cc"
@@ -431,6 +432,7 @@ void STMClient::main( void )
req.tv_sec = 0;
req.tv_nsec = 200000000; /* 0.2 sec */
nanosleep( &req, NULL );
freeze_timestamp();
} catch ( Crypto::CryptoException e ) {
if ( e.fatal ) {
throw;