~ubuntu-branches/ubuntu/hoary/kdemultimedia/hoary

« back to all changes in this revision

Viewing changes to mpeglib/lib/util/timeWrapper.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Schulze
  • Date: 2003-01-22 15:00:51 UTC
  • Revision ID: james.westby@ubuntu.com-20030122150051-uihwkdoxf15mi1tn
Tags: upstream-2.2.2
ImportĀ upstreamĀ versionĀ 2.2.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
  wrapps calls to usleep, gettimeofday,...
 
3
  Copyright (C) 2000  Martin Vogt
 
4
 
 
5
  This program is free software; you can redistribute it and/or modify
 
6
  it under the terms of the GNU Library General Public License as published by
 
7
  the Free Software Foundation.
 
8
 
 
9
  For more information look at the file COPYRIGHT in this package
 
10
 
 
11
 */
 
12
 
 
13
 
 
14
#ifndef __TIMEWRAPPER_H
 
15
#define __TIMEWRAPPER_H
 
16
 
 
17
#if defined WIN32
 
18
#include <winsock.h>
 
19
#include <sys/timeb.h>
 
20
#else
 
21
#include <unistd.h>
 
22
#include <sys/time.h>
 
23
#include <strings.h>
 
24
#endif
 
25
 
 
26
 
 
27
 
 
28
typedef struct timeval_s {
 
29
  long tv_sec;   /* seconds */
 
30
  long tv_usec;  /* microseconds */
 
31
} timeval_t;
 
32
 
 
33
class TimeWrapper {
 
34
 
 
35
 public:
 
36
  TimeWrapper();
 
37
  ~TimeWrapper();
 
38
  static void sleep(int sec);
 
39
  static void usleep(unsigned long usec);
 
40
  static void usleep(timeval_t* time);
 
41
  static void gettimeofday(timeval_t* time);
 
42
 
 
43
};
 
44
#endif