PIByteArray works on binary stream

This commit is contained in:
2022-05-10 15:23:18 +03:00
parent 0f9e592273
commit b2bc385397
58 changed files with 254 additions and 923 deletions

View File

@@ -81,19 +81,3 @@ void PIIntrospectionThreads::threadRunDone(PIThread * t, ullong us) {
ThreadInfo & ti(threads[t]);
ti.run_us = (ti.run_us * 0.8) + (us * 0.2); /// WARNING
}
PIByteArray & operator <<(PIByteArray & b, const PIIntrospectionThreads::ThreadInfo & v) {
b << v.classname << v.name << v.id << int(v.state) << v.priority << v.delay << v.run_us << v.run_count;
return b;
}
PIByteArray & operator >>(PIByteArray & b, PIIntrospectionThreads::ThreadInfo & v) {
int st(0);
b >> v.classname >> v.name >> v.id >> st >> v.priority >> v.delay >> v.run_us >> v.run_count;
v.state = (PIIntrospectionThreads::ThreadState)st;
return b;
}