remove patch that was missed by cvs in the previous commit

This commit is contained in:
robert 2016-04-22 06:08:20 +00:00
parent e675c69b16
commit 860f2c4a06

View File

@ -1,33 +0,0 @@
$OpenBSD: patch-provider_libserver_ECStatsTables_cpp,v 1.5 2016/04/01 18:08:10 robert Exp $
--- provider/libserver/ECStatsTables.cpp.orig Wed Mar 23 12:14:33 2016
+++ provider/libserver/ECStatsTables.cpp Thu Mar 31 23:23:31 2016
@@ -351,15 +351,26 @@ void ECSessionStatsTable::GetSessionData(ECSession *lp
// To get up-to-date CPU stats, check each of the active threads on the session
// for their CPU usage, and add that to the already-logged time on the session
for (iterBS = sd.busystates.begin(); iterBS != sd.busystates.end(); iterBS++) {
+#ifdef OPENBSD
+ struct tms now;
+
+ if(iterBS->threadid == NULL)
+ continue;
+
+ times(&now);
+
+ sd.dblUser += (now.tms_utime / CLOCKS_PER_SEC) - timespec2dbl(iterBS->threadstart);
+#else
clockid_t clock;
struct timespec now;
-
+
if(pthread_getcpuclockid(iterBS->threadid, &clock) != 0)
continue;
-
+
clock_gettime(clock, &now);
-
+
sd.dblUser += timespec2dbl(now) - timespec2dbl(iterBS->threadstart);
+#endif
sd.dblReal += GetTimeOfDay() - iterBS->start;
}
#endif