Initial import.
This commit is contained in:
17
refresh.cpp
Normal file
17
refresh.cpp
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <iostream>
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#include "nethogs.h"
|
||||
|
||||
extern bool needrefresh;
|
||||
extern unsigned refreshdelay;
|
||||
|
||||
void alarm_cb (int i)
|
||||
{
|
||||
needrefresh = true;
|
||||
//cout << "Setting needrefresh\n";
|
||||
|
||||
signal (SIGALRM, &alarm_cb);
|
||||
alarm(refreshdelay);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user