ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
model34.cpp
Go to the documentation of this file.
1 
8 #include <cmath>
9 #include <ctime>
10 
11 #if defined(_WIN32)
12  #include <windows.h>
13 #endif
14 
22 time_t _adwait(double sec)
23 {
24  time_t total_wait = 0;
25 
26  const time_t max_seconds =
27  static_cast<long int>(ceil(sec));
28 
29  time_t current;
30  time_t start;
31  time(&start);
32 
33  do
34  {
35  time(&current);
36  total_wait = current - start;
37  }
38  while(total_wait <= max_seconds);
39 
40  return total_wait;
41 }
42 void adwait(double sec)
43 {
44  _adwait(sec);
45 }
void adwait(double)
Definition: model34.cpp:42
time_t _adwait(double sec)
Author: David Fournier.
Definition: model34.cpp:22