1 |
/***************************************************************************** |
/***************************************************************************** |
2 |
* |
* |
3 |
* XVID MPEG-4 VIDEO CODEC |
* XVID MPEG-4 VIDEO CODEC |
4 |
* - Some timing functions to profile the library - |
* - Timer functions (used for internal debugging) - |
|
* |
|
|
* NB : not thread safe and only for debug purposes. |
|
5 |
* |
* |
6 |
* Copyright(C) 2002 Michael Militzer <isibaar@xvid.org> |
* Copyright(C) 2002 Michael Militzer <isibaar@xvid.org> |
7 |
* |
* |
|
* This program is an implementation of a part of one or more MPEG-4 |
|
|
* Video tools as specified in ISO/IEC 14496-2 standard. Those intending |
|
|
* to use this software module in hardware or software products are |
|
|
* advised that its use may infringe existing patents or copyrights, and |
|
|
* any such use would be at such party's own risk. The original |
|
|
* developer of this software module and his/her company, and subsequent |
|
|
* editors and their companies, will have no liability for use of this |
|
|
* software or modifications or derivatives thereof. |
|
|
* |
|
8 |
* This program is free software; you can redistribute it and/or modify |
* This program is free software; you can redistribute it and/or modify |
9 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
10 |
* the Free Software Foundation; either version 2 of the License, or |
* the Free Software Foundation; either version 2 of the License, or |
27 |
#include <time.h> |
#include <time.h> |
28 |
#include "timer.h" |
#include "timer.h" |
29 |
|
|
30 |
#ifdef _PROFILING_ |
#if defined(_PROFILING_) |
31 |
|
|
32 |
struct ts |
struct ts |
33 |
{ |
{ |
77 |
return (double) (y - x) / 1000.; |
return (double) (y - x) / 1000.; |
78 |
} |
} |
79 |
|
|
80 |
// set everything to zero // |
/* set everything to zero */ |
81 |
void |
void |
82 |
init_timer() |
init_timer() |
83 |
{ |
{ |