1 /***************************************************************************
4 * Copyright (C) 2000 by Håvard Frøiland, 2004 by Andreas Nicolai *
5 * ghorwin@users.sourceforge.net *
7 * This program is free software; you can redistribute it and/or modify *
8 * it under the terms of the GNU General Public License as published by *
9 * the Free Software Foundation; either version 2 of the License, or *
10 * (at your option) any later version. *
11 ***************************************************************************/
13 #include <qtextstream.h>
15 #include "ktouchutils.h"
17 QString
format_speed(double speed
) {
18 unsigned int mins
= static_cast<unsigned int>(speed
);
19 unsigned int secs
= static_cast<unsigned int>(speed
*60) - mins
*60;
20 return QString("%1' %2''").arg(mins
).arg(secs
);