summaryrefslogtreecommitdiff
path: root/libopie/pim/test/test_todo.cpp
blob: 74405034ddfac401ed03c8b474abd4f1240091b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <qdatetime.h>
#include <qmap.h>

#include <opie/otodo.h>
#include <opie/otodoaccess.h>
#include <opie/otodoaccessxml.h>

int main(int argc, char* argv[] ) {

    OTodoAccessXML* xml = new OTodoAccessXML("demo");
    OTodoAccess ac(xml);
    int elc;
    QTime timer;
    qWarning("start loading");
    timer.start();
    ac.load();
    elc = timer.elapsed();
    qWarning("Elapsed loading %d %d", elc, elc/1000);

    timer.start();
    OTodoAccess::List lis = ac.allRecords();
    elc = timer.elapsed();
    qWarning("Elapsed allRecords %d %d", elc, elc/1000 );
    OTodoAccess::List::Iterator it;
    timer.start();
ac.save();
/*
    for( it = lis.begin(); it != lis.end(); ++it ) {
        qWarning("Desc: " + (*it).summary() );
        qWarning("UID %d", (*it).uid() );
    }
    */
elc = timer.elapsed();

 qWarning("elapsed iterating %d %d", elc, elc/1000 );
};