axmol/cocos/editor-support/cocostudio/ext/SimpleTimer.h

20 lines
642 B
C
Raw Normal View History

2019-11-25 01:35:26 +08:00
// STIMER V2.0
// Copyright (c) 2014-2019 x-studio365 - All Rights Reserved
//
2019-11-24 23:15:56 +08:00
#ifndef _SIMPLE_TIMER_H_
#define _SIMPLE_TIMER_H_
#include "editor-support/cocostudio/CocosStudioExport.h"
#include <functional>
2019-11-25 01:35:26 +08:00
namespace stimer {
2019-11-24 23:15:56 +08:00
typedef void* TIMER_ID;
typedef std::function<void(void)> vcallback_t;
2019-11-25 01:35:26 +08:00
CC_STUDIOP_DLL TIMER_ID loop(unsigned int n, float interval, vcallback_t callback, bool bNative = true);
CC_STUDIOP_DLL TIMER_ID delay(float delay, vcallback_t callback, bool bNative = true);
CC_STUDIOP_DLL void kill(TIMER_ID timerId, bool bNative = true);
CC_STUDIOP_DLL void killAll(bool bNative = true);
2019-11-24 23:15:56 +08:00
}
#endif