mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-05 20:41:39 -07:00
code indent
This commit is contained in:
parent
531ee7734b
commit
720bdb3f96
83 changed files with 6377 additions and 6240 deletions
29
hydra-time.c
29
hydra-time.c
|
@ -2,30 +2,23 @@
|
|||
|
||||
#ifndef _WIN32
|
||||
#include <time.h>
|
||||
int32_t sleepn(time_t seconds)
|
||||
{
|
||||
struct timespec ts;
|
||||
ts.tv_sec = seconds;
|
||||
ts.tv_nsec = 0;
|
||||
return nanosleep(&ts, NULL);
|
||||
int32_t sleepn(time_t seconds) {
|
||||
struct timespec ts;
|
||||
ts.tv_sec = seconds;
|
||||
ts.tv_nsec = 0;
|
||||
return nanosleep(&ts, NULL);
|
||||
}
|
||||
int32_t usleepn(uint64_t milisec) {
|
||||
struct timespec ts;
|
||||
ts.tv_sec = milisec / 1000;
|
||||
ts.tv_nsec = (milisec % 1000) * 1000000L;
|
||||
return nanosleep(&ts, NULL);
|
||||
struct timespec ts;
|
||||
ts.tv_sec = milisec / 1000;
|
||||
ts.tv_nsec = (milisec % 1000) * 1000000L;
|
||||
return nanosleep(&ts, NULL);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include <windows.h>
|
||||
int32_t sleepn(uint32_t seconds)
|
||||
{
|
||||
return SleepEx(milisec*1000,TRUE);
|
||||
}
|
||||
int32_t sleepn(uint32_t seconds) { return SleepEx(milisec * 1000, TRUE); }
|
||||
|
||||
int32_t usleepn(uint32_t milisec)
|
||||
{
|
||||
return SleepEx(milisec,TRUE);
|
||||
}
|
||||
int32_t usleepn(uint32_t milisec) { return SleepEx(milisec, TRUE); }
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue