"Fossies" - the Fresh Open Source Software Archive

Member "xosview-1.23/bsd/loadmeter.h" (11 Jul 2020, 1187 Bytes) of package /linux/misc/xosview-1.23.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "loadmeter.h" see the Fossies "Dox" file reference documentation.

    1 //
    2 //  Copyright (c) 1994, 1995 by Mike Romberg ( romberg@fsl.noaa.gov )
    3 //  Copyright (c) 1995, 1996, 1997-2002 by Brian Grayson (bgrayson@netbsd.org)
    4 //
    5 //  Most of this code was written by Werner Fink <werner@suse.de>
    6 //  Only small changes were made on my part (M.R.)
    7 //  And the near-trivial port to NetBSD was by bgrayson.
    8 //
    9 //  This file may be distributed under terms of the GPL or of the BSD
   10 //    license, whichever you choose.  The full license notices are
   11 //    contained in the files COPYING.GPL and COPYING.BSD, which you
   12 //    should have received.  If not, contact one of the xosview
   13 //    authors for a copy.
   14 //
   15 
   16 #ifndef _LOADMETER_H_
   17 #define _LOADMETER_H_
   18 
   19 #include "fieldmetergraph.h"
   20 #include "xosview.h"
   21 
   22 
   23 class LoadMeter : public FieldMeterGraph {
   24 public:
   25     LoadMeter( XOSView *parent );
   26     ~LoadMeter( void );
   27 
   28     const char *name( void ) const { return "LoadMeter"; }
   29     void checkevent( void );
   30     void checkResources( void );
   31 
   32 protected:
   33     void getloadinfo( void );
   34 
   35 private:
   36     unsigned long procloadcol_, warnloadcol_, critloadcol_;
   37     int warnThreshold_, critThreshold_, alarmstate_, lastalarmstate_;
   38     int old_cpu_speed_, cur_cpu_speed_;
   39     bool do_cpu_speed_;
   40 };
   41 
   42 
   43 #endif