mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-02 23:27:00 +02:00
rename
This commit is contained in:
@@ -184,7 +184,7 @@ import LayerUI from "./LayerUI";
|
|||||||
import { Stats } from "./Stats";
|
import { Stats } from "./Stats";
|
||||||
import { Toast } from "./Toast";
|
import { Toast } from "./Toast";
|
||||||
import { actionToggleViewMode } from "../actions/actionToggleViewMode";
|
import { actionToggleViewMode } from "../actions/actionToggleViewMode";
|
||||||
import { getNetworkSpeed, simulatePing } from "../networkStats";
|
import { getNetworkSpeed, getNetworkPing } from "../networkStats";
|
||||||
|
|
||||||
const { history } = createHistory();
|
const { history } = createHistory();
|
||||||
|
|
||||||
@@ -1037,7 +1037,7 @@ class App extends React.Component<ExcalidrawProps, AppState> {
|
|||||||
clearTimeout(this.networkPingIntervalId);
|
clearTimeout(this.networkPingIntervalId);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const networkPing = await simulatePing();
|
const networkPing = await getNetworkPing();
|
||||||
this.setState({ networkPing });
|
this.setState({ networkPing });
|
||||||
if (this.networkPingIntervalId) {
|
if (this.networkPingIntervalId) {
|
||||||
clearTimeout(this.networkPingIntervalId);
|
clearTimeout(this.networkPingIntervalId);
|
||||||
|
@@ -51,7 +51,7 @@ export const getNetworkSpeed = async (): Promise<number> => {
|
|||||||
return await processImage();
|
return await processImage();
|
||||||
};
|
};
|
||||||
|
|
||||||
export const simulatePing = async () => {
|
export const getNetworkPing = async () => {
|
||||||
const startTime = new Date().getTime();
|
const startTime = new Date().getTime();
|
||||||
try {
|
try {
|
||||||
await fetch(process.env.REACT_APP_SOCKET_SERVER_URL, {
|
await fetch(process.env.REACT_APP_SOCKET_SERVER_URL, {
|
||||||
|
Reference in New Issue
Block a user