diff options
| author | Richard M. Stallman | 1994-07-25 23:21:24 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-07-25 23:21:24 +0000 |
| commit | 72ddb82c4952d98d25ef75dd1d38da3fe82bbb61 (patch) | |
| tree | 3ddfddbe9ad44b3dd48cc14fa664313d93274c52 /lib-src | |
| parent | 860befc8a298f7bc87b141e90faddb3a144123d4 (diff) | |
| download | emacs-72ddb82c4952d98d25ef75dd1d38da3fe82bbb61.tar.gz emacs-72ddb82c4952d98d25ef75dd1d38da3fe82bbb61.zip | |
(reset_watch, get_time): Use EMACS_GET_TIME.
(tzp): Var deleted.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/profile.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/lib-src/profile.c b/lib-src/profile.c index 523659c5586..16a74b71351 100644 --- a/lib-src/profile.c +++ b/lib-src/profile.c | |||
| @@ -34,24 +34,15 @@ | |||
| 34 | #include <../src/systime.h> | 34 | #include <../src/systime.h> |
| 35 | 35 | ||
| 36 | static struct timeval TV1, TV2; | 36 | static struct timeval TV1, TV2; |
| 37 | static struct timezone *tzp = (struct timezone *) NULL; /* no need timezone */ | ||
| 38 | static int watch_not_started = 1; /* flag */ | 37 | static int watch_not_started = 1; /* flag */ |
| 39 | static char time_string[30]; | 38 | static char time_string[30]; |
| 40 | 39 | ||
| 41 | #ifndef HAVE_GETTIMEOFDAY | ||
| 42 | gettimeofday () | ||
| 43 | { | ||
| 44 | fprintf (stderr, "profile: this system does not support gettimeofday\n"); | ||
| 45 | exit (1); | ||
| 46 | } | ||
| 47 | #endif | ||
| 48 | |||
| 49 | /* Reset the stopwatch to zero. */ | 40 | /* Reset the stopwatch to zero. */ |
| 50 | 41 | ||
| 51 | int | 42 | int |
| 52 | reset_watch () | 43 | reset_watch () |
| 53 | { | 44 | { |
| 54 | gettimeofday (&TV1, tzp); | 45 | EMACS_GET_TIME (TV1); |
| 55 | watch_not_started = 0; | 46 | watch_not_started = 0; |
| 56 | } | 47 | } |
| 57 | 48 | ||
| @@ -64,7 +55,7 @@ get_time () | |||
| 64 | { | 55 | { |
| 65 | if (watch_not_started) | 56 | if (watch_not_started) |
| 66 | exit (1); /* call reset_watch first ! */ | 57 | exit (1); /* call reset_watch first ! */ |
| 67 | gettimeofday (&TV2, tzp); | 58 | EMACS_GET_TIME (TV2); |
| 68 | if (TV1.tv_usec > TV2.tv_usec) | 59 | if (TV1.tv_usec > TV2.tv_usec) |
| 69 | { | 60 | { |
| 70 | TV2.tv_usec += 1000000; | 61 | TV2.tv_usec += 1000000; |