toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'usage': usage,
'userTime': userTime,
'systemTime': systemTime,
'threadDetails': threadDetails.map((thread) => thread.toJson()).toList(),
'detailedCoreUsages':
detailedCoreUsages.map((core) => core.toJson()).toList(),
'totalThreadCount': totalThreadCount,
'timestamp': timestamp,
'timestampDate': timestampDate.toIso8601String(),
};
}