mirror of
https://github.com/neovim/neovim.git
synced 2026-03-07 08:41:49 +10:00
- reltimestr(): Produce negative value by comparing the unsigned
proftime_T value to INT64_MAX.
https://github.com/neovim/neovim/issues/10452#issuecomment-511155132
1. The interfaces of nearly all platforms return uint64_t. INT64_MAX is
only half of that.
2. Low-level interfaces like this typically define that there is no
fixed starting point. The only guarantees are that it's (a)
monotonically increasing at a rate that (b) matches real time.
ref 06af88cd72
fix #10452
18 lines
310 B
C
18 lines
310 B
C
#ifndef NVIM_PROFILE_H
|
|
#define NVIM_PROFILE_H
|
|
|
|
#include <stdint.h>
|
|
#include <time.h>
|
|
|
|
typedef uint64_t proftime_T;
|
|
|
|
#define TIME_MSG(s) do { \
|
|
if (time_fd != NULL) time_msg(s, NULL); \
|
|
} while (0)
|
|
|
|
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
|
# include "profile.h.generated.h"
|
|
#endif
|
|
|
|
#endif // NVIM_PROFILE_H
|