Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
K
KWSys
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simon Wilson
KWSys
Commits
36d8666f
Commit
36d8666f
authored
9 years ago
by
Zack Galbreath
Committed by
Brad King
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Process: Add function to reset the start time of a process
Change-Id: I7d588cb060ea17ed4221c55b866cbbebab983e3c
parent
6b60c184
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Process.h.in
+7
-0
7 additions, 0 deletions
Process.h.in
ProcessUNIX.c
+11
-0
11 additions, 0 deletions
ProcessUNIX.c
ProcessWin32.c
+11
-0
11 additions, 0 deletions
ProcessWin32.c
with
29 additions
and
0 deletions
Process.h.in
+
7
−
0
View file @
36d8666f
...
...
@@ -77,6 +77,7 @@
# define kwsysProcess_WaitForExit kwsys_ns(Process_WaitForExit)
# define kwsysProcess_Interrupt kwsys_ns(Process_Interrupt)
# define kwsysProcess_Kill kwsys_ns(Process_Kill)
# define kwsysProcess_ResetStartTime kwsys_ns(Process_ResetStartTime)
#endif
#if defined(__cplusplus)
...
...
@@ -392,6 +393,11 @@ kwsysEXPORT void kwsysProcess_Interrupt(kwsysProcess* cp);
*/
kwsysEXPORT void kwsysProcess_Kill(kwsysProcess* cp);
/**
* Reset the start time of the child process to the current time.
*/
kwsysEXPORT void kwsysProcess_ResetStartTime(kwsysProcess* cp);
#if defined(__cplusplus)
} /* extern "C" */
#endif
...
...
@@ -456,6 +462,7 @@ kwsysEXPORT void kwsysProcess_Kill(kwsysProcess* cp);
# undef kwsysProcess_WaitForExit
# undef kwsysProcess_Interrupt
# undef kwsysProcess_Kill
# undef kwsysProcess_ResetStartTime
# endif
#endif
...
...
This diff is collapsed.
Click to expand it.
ProcessUNIX.c
+
11
−
0
View file @
36d8666f
...
...
@@ -3058,3 +3058,14 @@ static void kwsysProcessesSignalHandler(int signum
errno
=
old_errno
;
}
/*--------------------------------------------------------------------------*/
void
kwsysProcess_ResetStartTime
(
kwsysProcess
*
cp
)
{
if
(
!
cp
)
{
return
;
}
/* Reset start time. */
cp
->
StartTime
=
kwsysProcessTimeGetCurrent
();
}
This diff is collapsed.
Click to expand it.
ProcessWin32.c
+
11
−
0
View file @
36d8666f
...
...
@@ -3017,3 +3017,14 @@ static BOOL WINAPI kwsysCtrlHandler(DWORD dwCtrlType)
/* Continue on to default Ctrl handler (which calls ExitProcess). */
return
FALSE
;
}
/*--------------------------------------------------------------------------*/
void
kwsysProcess_ResetStartTime
(
kwsysProcess
*
cp
)
{
if
(
!
cp
)
{
return
;
}
/* Reset start time. */
cp
->
StartTime
=
kwsysProcessTimeGetCurrent
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment