This is Timer.h in view mode; [Download] [Up]
/* * Copyright (c) 1993 Christopher J. Kane. All rights reserved. * * This software is subject to the terms of the MiscKit license * agreement. Refer to the license document included with the * MiscKit distribution for these terms. * * Version: 1.1 (22 October 1993) */ #import <appkit/appkit.h> #import <misckit/SearchableText.h> // This is a "wrapper" class for the SearchableText protocol-- // it doesn't do any searching, but forwards the methods of the // protocol to the textObj. Normally, such wrappers aren't // needed. However, to order to time the method calls for this // example application, rather than instrumenting the MiscFindPanel // class code, or the code of MiscSearchText, this wrapper class // was created. // It is set to be the first conformer in the SBApp class by // the MiscFindPanelClass category to Application. See the // documentation for more information on this. // The "index fields" are not currently used. I was going to try // and generate some sort of performance index, but decided not // to. The fields are still in the .nib file too, just hidden. // The instance variables wallcallms and proccallms are simple // estimates of the amount of time needed for the timing function // calls. This calibration occurs when the Timer class is // instantiated, in -init. // Any timing results less than 100 ms should be taken with a grain // of salt. Function call times and the resolution that can be // achieved varies with the version of NEXTSTEP being used and the // type of processor. If you are getting times near, or below, // that you need to increase the amount of text being searched. // At minimum for example, you should be searching 500K of text on // a NeXT '040 cube running NS 3.1 if you want to do any half- // serious benchmarking. Be sure to take into consideration // memory swapping. And finally, remember that the code of this // class isn't intended to be very acurate, just give a general // idea for fun and curiosity. @interface Timer:Object <SearchableText> { id textObj; id messageField; id textWallField; id textProcField; id textIndexField; id tbmkWallField; id tbmkProcField; id tbmkIndexField; int wallcallms; int proccallms; } - init; @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.