ftp.nice.ch/pub/next/tools/performance/TimeMon.2.2.s.tar.gz#/TimeMon-2.2/Percentages.h

This is Percentages.h in view mode; [Download] [Up]

/*
  Percentages.h

	Interface file for the Percentage class.

  Copyright 1991 Scott Hess.  Permission to use, copy, modify, and
  distribute this software and its documentation for any purpose
  and without fee is hereby granted, provided that this copyright
  notice appear in all copies.  The copyright notice need not appear
  on binary-only distributions - just in source code.
  
  Scott Hess makes no representations about the suitability of this
  software for any purpose.  It is provided "as is" without express
  or implied warranty.
*/
#import <appkit/View.h>
#import <sys/dk.h>

@interface Percentages : View
{
  long oldTimes[ CPUSTATES];	/* Last _cp_time from kernel. */
  float pcents[ 3][ 3];		/* Percentages for display. */
  float lpcents[ 3][ 3];	/* Last-displayed percentages. */
  BOOL updateFlags[ 3];		/* Which percentages to update. */
  DPSTimedEntry te;		/* The timed entry keeping us alive. */
  int kmem;			/* File descriptor for /dev/kmem. */
  unsigned steps;		/* Number of steps we've done. */
  id periodText;		/* Period of the display. */
  id factorText;		/* Factor between layers. */
  id pauseMenuCell;		/* To change when we pause/unpause. */
  int layerFactor;		/* The factor that differentiates layers. */
}

	/* Set stuff up so that we can use it (esp. init the pcents). */
- initFrame:(NXRect *)r;
	/* Update as indicated by updateFlags. */
- update;
	/* Redraw by setting all updateFlags and calling update. */
- drawSelf:(NXRect *)r :(int)count;
	/* Get new _cp_time and apply that data to percentages. */
- step;
	/* Hook into initialization process of app, and do our
	   stuff (nlist kmem, open kmem, etc). */
- appDidInit:sender;
	/* Pull out timed entries and stuff. */
- appWillTerminate:sender;

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.