示例#1
0
文件: Clock.cs 项目: jwzl/ossbuild
public bool Wait (uint mseconds) {
  _TimeVal tv = new _TimeVal ();
  long sec = mseconds / 1000;
  long usec = 1000 * (mseconds - sec * 1000);
  tv.sec = (IntPtr) (sec);
  tv.usec = (IntPtr) (usec);
  return g_cond_timed_wait (EntriesChangedPtr, LockPtr, ref tv);
}
示例#2
0
文件: Clock.cs 项目: jwzl/ossbuild
public bool Wait (TimeSpan timespan) {
  _TimeVal tv = new _TimeVal ();
  long sec = (long) timespan.TotalSeconds;
  long usec = 1000 * ( ( (long) timespan.TotalMilliseconds) - sec * 1000);
  tv.sec = (IntPtr) (sec);
  tv.usec = (IntPtr) (usec);
  return g_cond_timed_wait (EntriesChangedPtr, LockPtr, ref tv);
}
示例#3
0
文件: Clock.cs 项目: jwzl/ossbuild
static extern bool g_cond_timed_wait (IntPtr cond, IntPtr mutex, ref _TimeVal abs_time);