-
-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#include "sleep.hpp" | ||
|
||
#include <windows.h> | ||
|
||
#include "util/debug.hpp" | ||
#include "util/def.hpp" | ||
#include "util/string.hpp" | ||
|
||
|
||
namespace vind | ||
{ | ||
namespace bind | ||
{ | ||
Sleep::Sleep() | ||
: BindedFuncVoid("sleep") | ||
{} | ||
void Sleep::sprocess( | ||
std::uint16_t count, | ||
const std::string& args) { | ||
if(!args.empty()) { | ||
count = util::extract_num<std::uint16_t>(args) ; | ||
|
||
if(args.back() != 'm') { | ||
count *= 1000 ; // convert the seconds into miliseconds | ||
} | ||
} | ||
else { | ||
count *= 1000 ; // assume the input is always seconds unit. | ||
} | ||
::Sleep(static_cast<DWORD>(count)) ; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
#ifndef _SLEEP_HPP | ||
#define _SLEEP_HPP | ||
|
||
#include "bind/bindedfunc.hpp" | ||
|
||
namespace vind | ||
{ | ||
namespace bind | ||
{ | ||
struct Sleep : public BindedFuncVoid<Sleep> { | ||
explicit Sleep() ; | ||
static void sprocess( | ||
std::uint16_t count, const std::string& args) ; | ||
} ; | ||
} | ||
} | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#ifndef _VERSION_HPP | ||
#define _VERSION_HPP | ||
|
||
#define WIN_VIND_VERSION "5.5.1.0" | ||
#define WIN_VIND_VERSION "5.5.2.0" | ||
|
||
#endif |