mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-23 08:00:20 +00:00
LibC: Make difftime a function
The previous define led to issues when compiling some ports, namely zsh 5.8.
This commit is contained in:
parent
9545ed1c21
commit
5245277369
Notes:
sideshowbarker
2024-07-19 01:54:00 +09:00
Author: https://github.com/The-King-of-Toasters Commit: https://github.com/SerenityOS/serenity/commit/52452773691 Pull-request: https://github.com/SerenityOS/serenity/pull/3758
2 changed files with 5 additions and 2 deletions
|
@ -362,4 +362,9 @@ int clock_getres(clockid_t, struct timespec*)
|
|||
{
|
||||
ASSERT_NOT_REACHED();
|
||||
}
|
||||
|
||||
double difftime(time_t t1, time_t t0)
|
||||
{
|
||||
return (double)(t1 - t0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,6 +85,4 @@ struct tm* localtime_r(const time_t* timep, struct tm* result);
|
|||
double difftime(time_t, time_t);
|
||||
size_t strftime(char* s, size_t max, const char* format, const struct tm*);
|
||||
|
||||
#define difftime(t1, t0) (double)(t1 - t0)
|
||||
|
||||
__END_DECLS
|
||||
|
|
Loading…
Reference in a new issue