Changeset 3bb2203 in tol
- Timestamp:
- May 25, 2010, 2:49:20 PM (16 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- d74c90b
- Parents:
- 26bc2dd
- Location:
- tol
- Files:
-
- 4 edited
-
bbasic/sys.cpp (modified) (1 diff)
-
bbasic/tol_bsys.h (modified) (1 diff)
-
btol/bgrammar/oprimp.cpp (modified) (1 diff)
-
btol/real_type/datgrav.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol/bbasic/sys.cpp
r26bc2dd r3bb2203 980 980 } 981 981 982 983 //-------------------------------------------------------------------- 984 //Make inactive waiting until they have passed a given number of milliseconds 985 void BSys::SleepMilliSeconds(unsigned int milliseconds) 986 //-------------------------------------------------------------------- 987 { 988 #ifdef _MSC_VER 989 Sleep(milliseconds); 990 #else 991 usleep(milliseconds*1000); 992 #endif 993 } 994 995 //-------------------------------------------------------------------- 996 //Opens a file and locks it 997 //If cannot do it then sleeps and retries again until time is out 998 FILE* FOpenAndLock( 999 const char *filename, 1000 const char *mode, 1001 unsigned int timeOutInMilliseconds, 1002 char* errorMessage) 1003 //-------------------------------------------------------------------- 1004 { 1005 FILE* fil=NULL; 1006 return(fil); 1007 } 1008 1009 //-------------------------------------------------------------------- 1010 //Unlocks a file and close it 1011 i FUnlockAndClose(FILE* file) 1012 //-------------------------------------------------------------------- 1013 { 1014 FILE* fil=NULL; 1015 return(fil); 1016 } -
tol/bbasic/tol_bsys.h
r26bc2dd r3bb2203 157 157 static double SessionTime(); 158 158 static const BDate& SessionInitTime(); 159 159 //Make inactive waiting until they have passed a given number of milliseconds 160 static void SleepMilliSeconds(unsigned int milliseconds); 161 //Opens a file and locks it 162 //If cannot do it then sleeps and retries again until time is out 163 static FILE* FOpenAndLock( 164 const char *filename, 165 const char *mode, 166 unsigned int timeOutInMilliseconds=0, 167 char* errorMessage=NULL); 168 //Unlocks a file and close it 169 static void FUnlockAndClose(FILE* file); 160 170 }; 161 171 -
tol/btol/bgrammar/oprimp.cpp
r26bc2dd r3bb2203 309 309 I2(" (trying again after 10 seconds)", 310 310 " (reintentando tras 10 segundos)")); 311 #ifdef _MSC_VER 312 Sleep(10000); 313 #else 314 sleep(10); 315 #endif 311 BSys::SleepMilliSeconds(10000); 316 312 dump = fopen(path,"w"); 317 313 } -
tol/btol/real_type/datgrav.cpp
r26bc2dd r3bb2203 2061 2061 I2("(Real seconds)", 2062 2062 "(Real segundos)"), 2063 I2("Sleeps TOL process while the specified time.", 2063 I2("Sleeps TOL process while the specified time. Minimum unit is " 2064 "millsecond, I.E. 0.001 seconds ", 2064 2065 "El proceso TOL se queda en estado de espera no activa durante el " 2065 "tiempo especificado. El proceso no consumirá CPU en este periodo."), 2066 "tiempo especificado. El proceso no consumirá CPU en este periodo. " 2067 "La unidad mínima de tiempo es el milisegundo, o sea, 0.001 " 2068 "segundos"), 2066 2069 BOperClassify::Conversion_); 2067 2070 void BDatSleep::CalcContens() … … 2069 2072 { 2070 2073 contens_ = Dat(Arg(1)); 2071 #ifdef _MSC_VER 2072 Sleep((BInt)contens_.Value()*1000); 2073 #else 2074 sleep((BInt)contens_.Value()); 2075 #endif 2074 BSys::SleepMilliSeconds((BInt)contens_.Value()*1000); 2076 2075 } 2077 2076
Note: See TracChangeset
for help on using the changeset viewer.
