/* ==================================================================== */ /* GENERIC.C */ /* */ /* -------------------------------------------------------------------- */ /*************************************************************************** * * Copyright (c) 1989, 1990, 1991, 1992, 1993 * Rector and Visitors of the University of Virginia * All Rights Reserved * * This file is part of the Mentat system software library. This software * is intended for research and is available free of charge for that * purpose; however, all material is the proprietary source of the * University of Virginia, and may not be disclosed or copied in any * form without the explicit written permission of the Univeristy of * Virginia. * * This software is distributed WITHOUT ANY WARRANTY; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR * PURPOSE. This software hereunder is provided on an "as is" basis, * and the University of Virginia has no obligation to provide maintenance, * support, updates, enhancements, or modifications. * * Send problems & suggestions to: * mentat@Virginia.EDU * ***************************************************************************/ /*-------------------------------------------------------------------------- * * This class implements a synthetic, "generic", wroker whose * member functions take one, two, and three integer arguments. * *------------------------------------------------------------------------*/ #include "generic.h" // Approx. 1 ms on a sun 3 is 550 FLOPS // Approx. 1 ms on a sparc 3 is 100 FLOPS void generic::create(int delaa) { delay = delaa; rtf(0); // Set the delay } int generic::one_arg(int arg1) { // Delay the right amount by doing FLOPs int count_len = delay * 100; float x = delay; float y = 0.0; for (int i=0; i