overall timing for undo/redo ops
git-svn-id: svn://localhost/ardour2/branches/3.0@6699 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
993af4468b
commit
95b8a69a58
@ -122,15 +122,25 @@ UndoTransaction::operator() ()
|
||||
void
|
||||
UndoTransaction::undo ()
|
||||
{
|
||||
struct timeval start, end, diff;
|
||||
gettimeofday (&start, 0);
|
||||
for (list<Command*>::reverse_iterator i = actions.rbegin(); i != actions.rend(); ++i) {
|
||||
(*i)->undo();
|
||||
}
|
||||
gettimeofday (&end, 0);
|
||||
timersub (&end, &start, &diff);
|
||||
cerr << "Undo took " << diff.tv_sec << '.' << diff.tv_usec << endl;
|
||||
}
|
||||
|
||||
void
|
||||
UndoTransaction::redo ()
|
||||
{
|
||||
struct timeval start, end, diff;
|
||||
gettimeofday (&start, 0);
|
||||
(*this)();
|
||||
gettimeofday (&end, 0);
|
||||
timersub (&end, &start, &diff);
|
||||
cerr << "Undo took " << diff.tv_sec << '.' << diff.tv_usec << endl;
|
||||
}
|
||||
|
||||
XMLNode &UndoTransaction::get_state()
|
||||
|
Loading…
Reference in New Issue
Block a user