mirror of
https://gitlab1.ptb.de/waltem01/Matrix
synced 2024-12-25 11:31:46 +00:00
measuring elapsed time
This commit is contained in:
parent
f9d2d9fd72
commit
233d8b6f82
@ -22,6 +22,19 @@
|
||||
|
||||
// Load image data from file
|
||||
imageURL = URL.createObjectURL(file);
|
||||
|
||||
// Time upload by saving date
|
||||
uploadData = {
|
||||
interval: setInterval(() => {
|
||||
const now = performance.now();
|
||||
const diff = now - uploadData.start;
|
||||
const secs = diff / 1000;
|
||||
|
||||
uploadData.elapsed = secs.toFixed(1);
|
||||
}, 75),
|
||||
start: performance.now(),
|
||||
elapsed: '0'
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user