openbsd-ports/productivity/taskjuggler/patches/patch-taskjuggler_Project_cpp
2006-10-31 20:56:42 +00:00

31 lines
752 B
Plaintext

$OpenBSD: patch-taskjuggler_Project_cpp,v 1.1 2006/10/31 20:56:43 sturm Exp $
Align 'now' date to timing resolution. from svn
--- taskjuggler/Project.cpp.orig Mon Oct 23 20:56:21 2006
+++ taskjuggler/Project.cpp Mon Oct 23 20:57:13 2006
@@ -85,7 +85,7 @@ Project::Project()
start = 0;
end = 0;
- now = time(0);
+ setNow(time(0));
minEffort = 0.0;
resourceLimits = 0;
@@ -247,6 +247,14 @@ int
Project::getScenarioIndex(const QString& id) const
{
return scenarioList.getIndex(id);
+}
+
+void
+Project::setNow(time_t n)
+{
+ /* Align 'now' time to timing resolution. If the resolution is
+ * changed later, this has to be done again. */
+ now = (n / scheduleGranularity) * scheduleGranularity;
}
void