diff --git a/Services/DankgopService.qml b/Services/DankgopService.qml index 4365da1d..e6f059d7 100644 --- a/Services/DankgopService.qml +++ b/Services/DankgopService.qml @@ -275,12 +275,12 @@ Singleton { perCoreCpuUsage = cpu.coreUsage || [] addToHistory(cpuHistory, cpuUsage) - // Update CPU sample data for the next run - if (cpu.total && cpu.cores) { + // Update CPU sample data for the next run using cursor data + if (cpu.cursor) { cpuSampleData = { - previousTotal: cpu.total, - previousCores: cpu.cores, - sampleTime: new Date().getTime() + previousTotal: cpu.cursor.total, + previousCores: cpu.cursor.cores, + timestamp: cpu.cursor.timestamp } } } @@ -373,11 +373,12 @@ Singleton { proc.command.substring(0, 15) + "..." : (proc.command || "") }) + // Extract cursor data from pticks for next sampling call if (proc.pid && typeof proc.pticks !== 'undefined') { newProcSample.push({ pid: proc.pid, previousTicks: proc.pticks, - sampleTime: new Date().getTime() + timestamp: new Date().getTime() }) } } diff --git a/Widgets/DankLocationSearch.qml b/Widgets/DankLocationSearch.qml index a31d0f2e..df5c8a14 100644 --- a/Widgets/DankLocationSearch.qml +++ b/Widgets/DankLocationSearch.qml @@ -51,7 +51,7 @@ Item { const searchLocation = locationInput.text root.currentSearchText = searchLocation const encodedLocation = encodeURIComponent(searchLocation) - const curlCommand = `curl -s --connect-timeout 5 --max-time 10 'https://nominatim.openstreetmap.org/search?q=${encodedLocation}&format=json&limit=5&addressdetails=1'` + const curlCommand = `curl -4 -s --connect-timeout 5 --max-time 10 'https://nominatim.openstreetmap.org/search?q=${encodedLocation}&format=json&limit=5&addressdetails=1'` locationSearcher.command = ["bash", "-c", curlCommand] locationSearcher.running = true }