author | mickeyl <mickeyl> | 2004-01-12 19:38:37 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-01-12 19:38:37 (UTC) |
commit | 209e45790acd34ad85f8eaa103de20243f099e3e (patch) (side-by-side diff) | |
tree | 980fccdea02e0aa8f9d52a857502c5dd1c87b151 | |
parent | 27e75f81eba7f5f7d267c2bac8f576cf7c9e2128 (diff) | |
download | opie-209e45790acd34ad85f8eaa103de20243f099e3e.zip opie-209e45790acd34ad85f8eaa103de20243f099e3e.tar.gz opie-209e45790acd34ad85f8eaa103de20243f099e3e.tar.bz2 |
nanoseconds are neither milliseconds nor microseconds
-rw-r--r-- | core/applets/rotateapplet/rotate.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/applets/rotateapplet/rotate.cpp b/core/applets/rotateapplet/rotate.cpp index d8081a6..906063e 100644 --- a/core/applets/rotateapplet/rotate.cpp +++ b/core/applets/rotateapplet/rotate.cpp @@ -52,49 +52,49 @@ RotateApplet::RotateApplet() #if !defined(QT_NO_COP) QCopChannel *rotateChannel = new QCopChannel( "QPE/Rotation" , this ); connect ( rotateChannel, SIGNAL( received( const QCString &, const QByteArray &) ), this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) ); #endif } RotateApplet::~RotateApplet ( ) {} /** * Qcop receive method. */ void RotateApplet::channelReceived( const QCString &msg, const QByteArray & data ) { qDebug( "RotateApplet::channelReceived( '%s' )", (const char*) msg ); if ( ODevice::inst()->hasHingeSensor() ) { struct timespec interval; struct timespec remain; interval.tv_sec = 0; - interval.tv_nsec = 600; + interval.tv_nsec = 600000; ::nanosleep( &interval, &remain ); OHingeStatus status = ODevice::inst()->readHingeSensor(); qDebug( "RotateApplet::readHingeSensor = %d", (int) status ); Config cfg( "apm" ); cfg.setGroup( PowerStatusManager::readStatus().acStatus() == PowerStatus::Online ? "AC" : "Battery" ); int action = cfg.readNumEntry( "CloseHingeAction", 0 ); if ( status == CASE_CLOSED ) { switch ( action ) { case 1: /* DISPLAY OFF */ ODevice::inst()->setDisplayBrightness( 0 ); break; case 2: /* SUSPEND */ ODevice::inst()->suspend(); break; default: /* IGNORE */ break; } } else /* status != CASE_CLOSED */ { switch ( action ) { case 1: /* DISPLAY OFF */ ODevice::inst()->setDisplayBrightness( 127 ); break; case 2: /* SUSPEND */ /* How to wake up the device from kernel? */; break; default: /* IGNORE */ break; |