Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Compare Revisions
f3d187230cf07ac4251d65c5afff999d8ff61268...0cc707ae754aabc942077bfe2836ada431ba4a23
Commits (1)
Use xp_timer()-based msclock() on Win32 too.
· 0cc707ae
Deucе
authored
Feb 12, 2022
Now it should keep working after 24 days.
0cc707ae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
13 deletions
+5
-13
src/xpdev/genwrap.c
src/xpdev/genwrap.c
+3
-5
src/xpdev/genwrap.h
src/xpdev/genwrap.h
+2
-8
No files found.
src/xpdev/genwrap.c
View file @
0cc707ae
...
@@ -690,10 +690,9 @@ char* os_cmdshell(void)
...
@@ -690,10 +690,9 @@ char* os_cmdshell(void)
return
(
shell
);
return
(
shell
);
}
}
/****************************************************************/
/********************************************************/
/* Microsoft (DOS/Win32) real-time system clock implementation. */
/* Stupid real-time system clock implementation. */
/****************************************************************/
/********************************************************/
#ifdef __unix__
clock_t
msclock
(
void
)
clock_t
msclock
(
void
)
{
{
long
double
t
=
roundl
(
xp_timer
()
*
1000
);
long
double
t
=
roundl
(
xp_timer
()
*
1000
);
...
@@ -705,7 +704,6 @@ clock_t msclock(void)
...
@@ -705,7 +704,6 @@ clock_t msclock(void)
return
(
clock_t
)
t
;
return
(
clock_t
)
t
;
}
}
#endif
/****************************************************************************/
/****************************************************************************/
/* Skips all white-space chars at beginning of 'str' */
/* Skips all white-space chars at beginning of 'str' */
...
...
src/xpdev/genwrap.h
View file @
0cc707ae
...
@@ -378,14 +378,8 @@ DLLEXPORT char* byte_count_to_str(int64_t bytes, char* str, size_t size);
...
@@ -378,14 +378,8 @@ DLLEXPORT char* byte_count_to_str(int64_t bytes, char* str, size_t size);
DLLEXPORT
char
*
byte_estimate_to_str
(
int64_t
bytes
,
char
*
str
,
size_t
size
,
ulong
unit
,
int
precision
);
DLLEXPORT
char
*
byte_estimate_to_str
(
int64_t
bytes
,
char
*
str
,
size_t
size
,
ulong
unit
,
int
precision
);
/* Microsoft (e.g. DOS/Win32) real-time system clock API (ticks since process started) */
/* Microsoft (e.g. DOS/Win32) real-time system clock API (ticks since process started) */
typedef
clock_t
msclock_t
;
#define MSCLOCKS_PER_SEC 1000
#if defined(_WIN32) || defined(__OS2__)
msclock_t
msclock
(
void
);
#define MSCLOCKS_PER_SEC CLOCKS_PER_SEC
/* e.g. 18.2 on DOS, 1000.0 on Win32 */
#define msclock() clock()
#else
#define MSCLOCKS_PER_SEC 1000
msclock_t
msclock
(
void
);
#endif
DLLEXPORT
BOOL
check_pid
(
pid_t
);
DLLEXPORT
BOOL
check_pid
(
pid_t
);
DLLEXPORT
BOOL
terminate_pid
(
pid_t
);
DLLEXPORT
BOOL
terminate_pid
(
pid_t
);
...
...