mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Update singleApplication.
See : https://github.com/itay-grudev/SingleApplication git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5708 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -91,7 +91,7 @@ SingleApplication::SingleApplication( int &argc, char *argv[], bool allowSeconda
|
||||
|
||||
d->memory->unlock();
|
||||
|
||||
// Random sleep here limits the probability of a colision between two racing apps
|
||||
// Random sleep here limits the probability of a collision between two racing apps
|
||||
qsrand( QDateTime::currentMSecsSinceEpoch() % std::numeric_limits<uint>::max() );
|
||||
QThread::sleep( 8 + static_cast <unsigned long>( static_cast <float>( qrand() ) / RAND_MAX * 10 ) );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user