132001f49Smrg/*
232001f49Smrg * Copyright (C) 2009  VMware, Inc.  All Rights Reserved.
332001f49Smrg *
432001f49Smrg * Permission is hereby granted, free of charge, to any person obtaining a
532001f49Smrg * copy of this software and associated documentation files (the "Software"),
632001f49Smrg * to deal in the Software without restriction, including without limitation
732001f49Smrg * the rights to use, copy, modify, merge, publish, distribute, sublicense,
832001f49Smrg * and/or sell copies of the Software, and to permit persons to whom the
932001f49Smrg * Software is furnished to do so, subject to the following conditions:
1032001f49Smrg *
1132001f49Smrg * The above copyright notice and this permission notice shall be included
1232001f49Smrg * in all copies or substantial portions of the Software.
1332001f49Smrg *
1432001f49Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1532001f49Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1632001f49Smrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1732001f49Smrg * VMWARE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
1832001f49Smrg * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
1932001f49Smrg * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2032001f49Smrg */
2132001f49Smrg
2232001f49Smrg
2332001f49Smrg#ifndef COMMON_H
2432001f49Smrg#define COMMON_H
2532001f49Smrg
2632001f49Smrg
2732001f49Smrg#include <stddef.h> /* for offsetof() */
2832001f49Smrg
2932001f49Smrg
3032001f49Smrgtypedef void (*PerfRateFunc)(unsigned count);
3132001f49Smrg
3232001f49Smrg
3332001f49Smrgextern double
3432001f49SmrgPerfMeasureRate(PerfRateFunc f);
3532001f49Smrg
3632001f49Smrgconst char *
3732001f49SmrgPerfHumanFloat( double d );
3832001f49Smrg
3932001f49Smrgextern void
4032001f49Smrgperf_printf(const char *format, ...);
4132001f49Smrg
4232001f49Smrg
4332001f49Smrg#endif /* COMMON_H */
4432001f49Smrg
45