Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
htop
Commits
79e39012
Commit
79e39012
authored
Apr 21, 2014
by
Hisham Muhammad
Browse files
Remove use of usleep, which is sadly obsolete.
parent
f239b62b
Changes
1
Hide whitespace changes
Inline
Side-by-side
htop.c
View file @
79e39012
...
...
@@ -339,6 +339,16 @@ void sortBy(Panel* panel, ProcessList* pl, Settings* settings, int headerHeight,
Object_delete
(
sortPanel
);
}
static
int
millisleep
(
unsigned
long
millisec
)
{
struct
timespec
req
=
{
.
tv_sec
=
0
,
.
tv_nsec
=
millisec
*
1000000L
};
while
(
nanosleep
(
&
req
,
&
req
)
==-
1
)
{
continue
;
}
}
int
main
(
int
argc
,
char
**
argv
)
{
int
delay
=
-
1
;
...
...
@@ -497,7 +507,7 @@ int main(int argc, char** argv) {
IncSet
*
inc
=
IncSet_new
(
defaultBar
);
ProcessList_scan
(
pl
);
u
sleep
(
75
000
);
milli
sleep
(
75
);
FunctionBar_draw
(
defaultBar
,
NULL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment