Mercurial > hg > orthanc-stone
comparison Platforms/Generic/DelayedCallCommand.cpp @ 588:2a8ac2d426db
renamed ColorTextureSceneLayer, dropped dependency on boost::chrono
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 25 Apr 2019 13:54:42 +0200 |
parents | 26b90b110719 |
children | 4f2416d519b4 |
comparison
equal
deleted
inserted
replaced
586:5b4890d289cf | 588:2a8ac2d426db |
---|---|
34 ) : | 34 ) : |
35 IObservable(broker), | 35 IObservable(broker), |
36 callback_(callback), | 36 callback_(callback), |
37 payload_(payload), | 37 payload_(payload), |
38 context_(context), | 38 context_(context), |
39 expirationTimePoint_(boost::chrono::system_clock::now() + boost::chrono::milliseconds(timeoutInMs)), | 39 expirationTimePoint_(boost::posix_time::microsec_clock::local_time() + boost::posix_time::milliseconds(timeoutInMs)), |
40 timeoutInMs_(timeoutInMs) | 40 timeoutInMs_(timeoutInMs) |
41 { | 41 { |
42 } | 42 } |
43 | 43 |
44 | 44 |
45 void DelayedCallCommand::Execute() | 45 void DelayedCallCommand::Execute() |
46 { | 46 { |
47 while (boost::chrono::system_clock::now() < expirationTimePoint_) | 47 while (boost::posix_time::microsec_clock::local_time() < expirationTimePoint_) |
48 { | 48 { |
49 boost::this_thread::sleep_for(boost::chrono::milliseconds(1)); | 49 boost::this_thread::sleep(boost::posix_time::milliseconds(1)); |
50 } | 50 } |
51 } | 51 } |
52 | 52 |
53 void DelayedCallCommand::Commit() | 53 void DelayedCallCommand::Commit() |
54 { | 54 { |