Kiwi Multi Threading Framework
Classes | Functions | Variables
/Users/tomoo/Project/KiwiThread/Source/KTIntervalTimer.h File Reference

Define KTIntervalTimer instance. More...

#import "KTType.h"
#import <Coconut/Coconut.h>

Go to the source code of this file.

Classes

struct  KTIntervalTimer
 Interval timer task. More...
struct  KTIntervalTimerMethods
 Type definition of methods for KTIntervalTimer. More...

Functions

struct KTIntervalTimerKTAllocateIntervalTimer (dispatch_queue_t queue, double interval, struct CNResource *resource)
 Allocate trigger timer instance.
static struct CNInstance * KTInstanceOfIntervalTimer (struct KTIntervalTimer *src)
 Get instance of CNIntervalTimer.
static KTTaskState KTStateOfIntervalTimer (struct KTIntervalTimer *src)
 Get state of interval timer.
void KTStartIntervalTimer (struct KTIntervalTimer *src)
 Start the timer.
void KTStopIntervalTimer (struct KTIntervalTimer *src)
 Stop the timer.
void KTAddInstanceTriggerToIntervalTimer (struct KTIntervalTimer *dst, KTInstanceTriggerFuncRef func, struct CNInstance *inst)
 Add consumer functions of interval timer.

Variables

struct KTIntervalTimerMethods KTSharedIntervalTimerMethods

Detailed Description

Define KTIntervalTimer instance.

Copyright
Copyright (C) 2012 Steel Wheels Project
Reference
o Concurrency Programming Guide See "Dispatch Queues/Creating Timer".

Function Documentation

void KTAddInstanceTriggerToIntervalTimer ( struct KTIntervalTimer dst,
KTInstanceTriggerFuncRef  func,
struct CNInstance *  inst 
)

Add consumer functions of interval timer.

Parameters:
dstInterval timer
funcTrigger function
instParameter for the trigger function call
struct KTIntervalTimer* KTAllocateIntervalTimer ( dispatch_queue_t  queue,
double  interval,
struct CNResource *  resource 
) [read]

Allocate trigger timer instance.

Returns:
Allocated instance
Parameters:
queueQueue to execute the timer task
intervalTimer interval [sec]
resourceResouce to allocate this instance
static struct CNInstance* KTInstanceOfIntervalTimer ( struct KTIntervalTimer src) [static, read]

Get instance of CNIntervalTimer.

Returns:
Instance of source
Parameters:
srcSource trigger timer
void KTStartIntervalTimer ( struct KTIntervalTimer src)

Start the timer.

Parameters:
srcSource trigger timer
static KTTaskState KTStateOfIntervalTimer ( struct KTIntervalTimer src) [inline, static]

Get state of interval timer.

Returns:
State of timer
Parameters:
srcSource interval timer
void KTStopIntervalTimer ( struct KTIntervalTimer src)

Stop the timer.

Parameters:
srcSource trigger timer

Variable Documentation

Shared methods for CNIntervalTimer

 All Classes Files Functions Variables Typedefs Enumerations Enumerator