pr_queuejob_timer.rst (956B)
1 PR_QueueJob_Timer 2 ================= 3 4 Causes a job to be queued when a timer expires. 5 6 7 Syntax 8 ------ 9 10 .. code:: 11 12 #include <prtpool.h> 13 14 NSPR_API(PRJob *) 15 PR_QueueJob_Timer( 16 PRThreadPool *tpool, 17 PRIntervalTime timeout, 18 PRJobFn fn, 19 void * arg, 20 PRBool joinable 21 ); 22 23 24 Parameters 25 ~~~~~~~~~~ 26 27 The function has the following parameters: 28 29 ``tpool`` 30 A pointer to a :ref:`PRThreadPool` structure previously created by a 31 call to :ref:`PR_CreateThreadPool`. 32 ``iod`` 33 A pointer to a :ref:`PRJobIoDesc` structure. 34 ``timeout`` 35 A value, expressed as a :ref:`PRIntervalTime`, to wait before queuing 36 the job. 37 ``fn`` 38 The function to be executed when the job is executed. 39 ``arg`` 40 A pointer to an argument passed to ``fn``. 41 ``joinable`` 42 If ``PR_TRUE``, the job is joinable. If ``PR_FALSE``, the job is not 43 joinable. See :ref:`PR_JoinJob`. 44 45 46 Returns 47 ~~~~~~~ 48 49 Pointer to a :ref:`PRJob` structure or ``NULL`` on error.