-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* irq configuration * changelog * type fix * test * IRQ rate value restriction * fix and add test * test wip * fix test * api report * add comment * unuse concurrent for time-related tests
- Loading branch information
Showing
7 changed files
with
215 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<template> | ||
<div ref="bg" id="settings-bg" @click="(e) => e.target === bg && $emit('exit')"> | ||
<div id="settings-body"> | ||
<div class="settings-item"> | ||
<header>IRQ Rate</header> | ||
<input type="number" v-model="settings.irqRate" /> | ||
</div> | ||
<div class="settings-item"> | ||
<header>IRQ Sleep Time</header> | ||
<div> | ||
<input type="radio" value="time" v-model="irqSleepMethod" /> | ||
time(milliseconds) | ||
<input type="number" v-model="irqSleepTime" :disabled="irqSleepMethod !== 'time'" /> | ||
</div> | ||
<div> | ||
<input type="radio" value="requestIdleCallback" v-model="irqSleepMethod" /> | ||
requestIdleCallback | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { ref, computed } from 'vue'; | ||
const irqSleepTime = ref(5); | ||
const irqSleepMethod = ref('time'); | ||
export const settings = ref({ | ||
irqRate: 300, | ||
irqSleep: computed(() => ({ | ||
time: irqSleepTime.value, | ||
requestIdleCallback: () => new Promise(cb => requestIdleCallback(cb)), | ||
})[irqSleepMethod.value]), | ||
}); | ||
</script> | ||
|
||
<script setup> | ||
const emits = defineEmits(['exit']); | ||
const bg = ref(null); | ||
</script> | ||
|
||
<style> | ||
#settings-bg { | ||
position: fixed; | ||
top: 0; | ||
left: 0; | ||
z-index: 10; | ||
width: 100vw; | ||
height: 100vh; | ||
background: #0008; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
#settings-body { | ||
display: grid; | ||
gap: 1em; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
- For Hosts: Interpreterのオプションに`irqRate`と`irqSleep`を追加 | ||
- `irqRate`はInterpreterの定期休止が何ステップに一回起こるかを指定する数値 | ||
- `irqSleep`は休止時間をミリ秒で指定する数値、または休止ごとにawaitされるPromiseを返す関数 |