Просмотр исходного кода

* Fixed displaying of compilation time in some cases. For example, if the compilation time is 0.99 seconds, it has been displayed as 0.10. Now it is correctly displayed as 1.0.

git-svn-id: trunk@23689 -
yury 12 лет назад
Родитель
Сommit
268b2d56d7
1 измененных файлов с 2 добавлено и 0 удалено
  1. 2 0
      compiler/compiler.pas

+ 2 - 0
compiler/compiler.pas

@@ -271,6 +271,8 @@ begin
           totaltime:=getrealtime-starttime;
           totaltime:=getrealtime-starttime;
           if totaltime<0 then
           if totaltime<0 then
             totaltime:=totaltime+3600.0*24.0;
             totaltime:=totaltime+3600.0*24.0;
+          if round(frac(totaltime)*10) >= 10 then
+            totaltime:=trunc(totaltime) + 1;
           timestr:=tostr(trunc(totaltime))+'.'+tostr(round(frac(totaltime)*10));
           timestr:=tostr(trunc(totaltime))+'.'+tostr(round(frac(totaltime)*10));
           if status.codesize<>aword(-1) then
           if status.codesize<>aword(-1) then
             linkstr:=', '+tostr(status.codesize)+' ' +strpas(MessagePChar(general_text_bytes_code))+', '+tostr(status.datasize)+' '+strpas(MessagePChar(general_text_bytes_data))
             linkstr:=', '+tostr(status.codesize)+' ' +strpas(MessagePChar(general_text_bytes_code))+', '+tostr(status.datasize)+' '+strpas(MessagePChar(general_text_bytes_data))