~ubuntu-branches/ubuntu/warty/xplanet/warty

« back to all changes in this revision

Viewing changes to src/libdisplay/getTimer.cpp

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-08-24 07:14:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040824071400-2dr4qnjbjmm8z3ia
Tags: 1.0.6-1ubuntu1
Build-depend: libtiff4-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include "config.h"
 
2
 
 
3
#include "Timer.h"
 
4
 
 
5
#ifdef HAVE_LIBX11
 
6
#include "TimerX11.h"
 
7
#endif
 
8
 
 
9
Timer *getTimer(const int wait, const unsigned long hibernate, 
 
10
                const unsigned long idlewait)
 
11
{
 
12
#ifdef HAVE_LIBX11
 
13
    Display *d = XOpenDisplay(NULL);
 
14
    if (d != NULL) 
 
15
    {
 
16
        XCloseDisplay(d);
 
17
        return(new TimerX11(wait, hibernate, idlewait));
 
18
    }
 
19
#endif
 
20
 
 
21
    return(new Timer(wait, hibernate, idlewait));
 
22
}