mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-01 19:37:45 +01:00
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
1 changed files with 10 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue