| 861 | | |
|---|
| 862 | | log(osg::NOTICE,"Number of tasks completed %i, running %i, pending %i. Estimated time to completion %.1f seconds, %2.1f percent done.",numTasksCompleted, numTasksRunning, numTasksPending, estimateTimeToCompletion, 100.0*currentTime/estimatedTimeOfLastCompletion); |
|---|
| | 861 | |
|---|
| | 862 | double daysToCompletion = floor(estimateTimeToCompletion / (24.0*60.0*60.0) ); |
|---|
| | 863 | double secondsRemainder = estimateTimeToCompletion - daysToCompletion*24.0*60.0*60.0; |
|---|
| | 864 | double hoursToCompletion = floor(secondsRemainder / (60.0*60.0)); |
|---|
| | 865 | secondsRemainder = secondsRemainder - hoursToCompletion*60.0*60.0; |
|---|
| | 866 | |
|---|
| | 867 | double minutesToCompletion = floor(secondsRemainder / 60.0); |
|---|
| | 868 | secondsRemainder = secondsRemainder - minutesToCompletion*60.0; |
|---|
| | 869 | |
|---|
| | 870 | if (daysToCompletion>0.0) |
|---|
| | 871 | { |
|---|
| | 872 | log(osg::NOTICE,"Number of tasks completed %i, running %i, pending %i. Estimated time to completion %d days, %d hours, %d minutes, %2.1f percent done.", |
|---|
| | 873 | numTasksCompleted, numTasksRunning, numTasksPending, |
|---|
| | 874 | int(daysToCompletion), int(hoursToCompletion), int(minutesToCompletion), |
|---|
| | 875 | 100.0*currentTime/estimatedTimeOfLastCompletion); |
|---|
| | 876 | } |
|---|
| | 877 | else if (hoursToCompletion>0.0) |
|---|
| | 878 | { |
|---|
| | 879 | log(osg::NOTICE,"Number of tasks completed %i, running %i, pending %i. Estimated time to completion %d hours, %d minutes, %2.1f percent done.", |
|---|
| | 880 | numTasksCompleted, numTasksRunning, numTasksPending, |
|---|
| | 881 | int(hoursToCompletion), int(minutesToCompletion), |
|---|
| | 882 | 100.0*currentTime/estimatedTimeOfLastCompletion); |
|---|
| | 883 | } |
|---|
| | 884 | else if (minutesToCompletion>0.0) |
|---|
| | 885 | { |
|---|
| | 886 | log(osg::NOTICE,"Number of tasks completed %i, running %i, pending %i. Estimated time to completion %d minutes, %d seconds, %2.1f percent done.", |
|---|
| | 887 | numTasksCompleted, numTasksRunning, numTasksPending, |
|---|
| | 888 | int(minutesToCompletion),int(secondsRemainder), |
|---|
| | 889 | 100.0*currentTime/estimatedTimeOfLastCompletion); |
|---|
| | 890 | } |
|---|
| | 891 | else |
|---|
| | 892 | { |
|---|
| | 893 | log(osg::NOTICE,"Number of tasks completed %i, running %i, pending %i. Estimated time to completion %d seconds, %2.1f percent done.", |
|---|
| | 894 | numTasksCompleted, numTasksRunning, numTasksPending, |
|---|
| | 895 | int(secondsRemainder), |
|---|
| | 896 | 100.0*currentTime/estimatedTimeOfLastCompletion); |
|---|
| | 897 | } |
|---|