示例#1
0
 void PrepareCallback(Prepare handle)
 {
     this.prepareCalled++;
     if (this.prepareCalled == NumberOfticks)
     {
         handle.Stop();
     }
 }
示例#2
0
        void Prepare2Callback(Prepare handle)
        {
            /* prepare2 gets started by prepare1 when (loop_iteration % 2 == 0), */
            /* and it stops itself immediately. A started watcher is not queued */
            /* until the next round, so when this callback is made */
            /* (loop_iteration % 2 == 0) cannot be true. */
            this.prepare2CallbackCheck &= this.loopIteration % 2 != 0;

            handle.Stop();
            this.prepare2Called++;
        }