Use gettimeofday() directly instead of via the gettime() wrapper.

This commit is contained in:
Todd C. Miller
2010-08-10 13:50:40 -04:00
parent 8dd8aa000e
commit 6bcd9efc0c
7 changed files with 6 additions and 52 deletions

View File

@@ -244,7 +244,7 @@ sudo_edit(struct command_details *command_details, char *argv[], char *envp[])
* Run the editor with the invoking user's creds,
* keeping track of the time spent in the editor.
*/
gettime(&tv1);
gettimeofday(&tv1, NULL);
memcpy(&editor_details, command_details, sizeof(editor_details));
editor_details.uid = user_details.uid;
editor_details.euid = user_details.uid;
@@ -253,7 +253,7 @@ sudo_edit(struct command_details *command_details, char *argv[], char *envp[])
editor_details.ngroups = user_details.ngroups;
editor_details.groups = user_details.groups;
rval = run_command(&editor_details, nargv, envp);
gettime(&tv2);
gettimeofday(&tv2, NULL);
/* Copy contents of temp files to real ones */
for (i = 0; i < nfiles; i++) {