i made a dbus interface, run a method where in a forever loop i tried ..
QDateTime aTime_
=getTime
();
//gives the same format as current while(1){
qDebug()<<currTime << aTime_;
if(aTime_.date()==currTime.date()){
qDebug()<<"date checked"
emit signalTime();
}
//this part never calls
if(aTime_.time()==currTime.time()){
qDebug()<<"time checked";
emit signalTime();
}
}
QDateTime aTime_=getTime(); //gives the same format as current
while(1){
QDateTime currTime=QDateTime::currentDateTime ();
qDebug()<<currTime << aTime_;
if(aTime_.date()==currTime.date()){
qDebug()<<"date checked"
emit signalTime();
}
//this part never calls
if(aTime_.time()==currTime.time()){
qDebug()<<"time checked";
emit signalTime();
}
}
To copy to clipboard, switch view to plain text mode
aTime_.time()==currTime.time() ....this compare never calls, ???
another question is Is that the right way to make a daemon, or there is any other alternatives..
Bookmarks