61 lines
1.9 KiB
TypeScript
61 lines
1.9 KiB
TypeScript
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
|
// This file is automatically generated. DO NOT EDIT
|
|
|
|
/**
|
|
* SystemService 系统监控服务
|
|
* @module
|
|
*/
|
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
// @ts-ignore: Unused imports
|
|
import {Call as $Call, Create as $Create} from "@wailsio/runtime";
|
|
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
// @ts-ignore: Unused imports
|
|
import * as $models from "./models.js";
|
|
|
|
/**
|
|
* FormatBytes 格式化字节数为人类可读的格式
|
|
*/
|
|
export function FormatBytes(bytes: number): Promise<string> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(1368998019, bytes) as any;
|
|
return $resultPromise;
|
|
}
|
|
|
|
/**
|
|
* GetMemoryStats 获取当前内存统计信息
|
|
*/
|
|
export function GetMemoryStats(): Promise<$models.MemoryStats> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(1678201009) as any;
|
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
|
return $$createType0($result);
|
|
}) as any;
|
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
return $typingPromise;
|
|
}
|
|
|
|
/**
|
|
* GetSystemInfo 获取系统环境信息
|
|
*/
|
|
export function GetSystemInfo(): Promise<$models.SystemInfo | null> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(2629436820) as any;
|
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
|
return $$createType2($result);
|
|
}) as any;
|
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
return $typingPromise;
|
|
}
|
|
|
|
/**
|
|
* TriggerGC 手动触发垃圾回收
|
|
*/
|
|
export function TriggerGC(): Promise<void> & { cancel(): void } {
|
|
let $resultPromise = $Call.ByID(741882899) as any;
|
|
return $resultPromise;
|
|
}
|
|
|
|
// Private type creation functions
|
|
const $$createType0 = $models.MemoryStats.createFrom;
|
|
const $$createType1 = $models.SystemInfo.createFrom;
|
|
const $$createType2 = $Create.Nullable($$createType1);
|