diff options
author | rowanbeentje <rowan@beent.je> | 2009-04-09 21:11:17 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-04-09 21:11:17 +0000 |
commit | 1ed9e77dff7bd74b04d6dc35849b6b644f11e2d5 (patch) | |
tree | cfe1edddd94e3943c2512e7fead813cae61827b5 | |
parent | ddc5add77f3984cae1601e96d564cf4ba7347202 (diff) | |
download | sequelpro-1ed9e77dff7bd74b04d6dc35849b6b644f11e2d5.tar.gz sequelpro-1ed9e77dff7bd74b04d6dc35849b6b644f11e2d5.tar.bz2 sequelpro-1ed9e77dff7bd74b04d6dc35849b6b644f11e2d5.zip |
- Improve time interval granularity for times below 10 seconds (show two decimal places instead of one)
-rw-r--r-- | Source/SPStringAdditions.m | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/SPStringAdditions.m b/Source/SPStringAdditions.m index 2c719f6c..e0bf65cf 100644 --- a/Source/SPStringAdditions.m +++ b/Source/SPStringAdditions.m @@ -83,6 +83,12 @@ return [numberFormatter stringFromNumber:[NSNumber numberWithFloat:timeInterval]]; } + if (timeInterval < 10) { + [numberFormatter setFormat:@"#,##0.00 s"]; + + return [numberFormatter stringFromNumber:[NSNumber numberWithFloat:timeInterval]]; + } + if (timeInterval < 100) { [numberFormatter setFormat:@"#,##0.0 s"]; |