Commit 79e39012 authored by Hisham Muhammad's avatar Hisham Muhammad
Browse files

Remove use of usleep, which is sadly obsolete.

parent f239b62b
......@@ -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);
usleep(75000);
millisleep(75);
FunctionBar_draw(defaultBar, NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment