mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-12 13:28:33 +00:00
Profile editor - Fix update timer frequency which was causing freezes
This commit is contained in:
parent
a9d4bd2385
commit
c18f542a61
@ -57,7 +57,7 @@ public partial class PlaybackViewModel : ActivatableViewModelBase
|
||||
_keyBindingsEnabled = Shared.UI.CurrentKeyBindingsEnabled.ToProperty(this, vm => vm.KeyBindingsEnabled).DisposeWith(d);
|
||||
|
||||
// Update timer
|
||||
Timer updateTimer = new(TimeSpan.FromMilliseconds(60.0 / 1000));
|
||||
Timer updateTimer = new(TimeSpan.FromMilliseconds(16));
|
||||
updateTimer.Elapsed += (_, _) => Update();
|
||||
updateTimer.DisposeWith(d);
|
||||
_profileEditorService.Playing.Subscribe(_ => _lastUpdate = DateTime.Now).DisposeWith(d);
|
||||
|
||||
@ -51,7 +51,7 @@ public class DataBindingViewModel : ActivatableViewModelBase
|
||||
.DisposeWith(d);
|
||||
_profileEditorService.Playing.CombineLatest(_profileEditorService.SuspendedEditing).Subscribe(tuple => _playing = tuple.First || tuple.Second).DisposeWith(d);
|
||||
|
||||
Timer updateTimer = new(TimeSpan.FromMilliseconds(25.0 / 1000));
|
||||
Timer updateTimer = new(TimeSpan.FromMilliseconds(25));
|
||||
Timer saveTimer = new(TimeSpan.FromMinutes(2));
|
||||
|
||||
updateTimer.Elapsed += (_, _) => Update();
|
||||
|
||||
@ -66,7 +66,7 @@ public class NodeScriptWindowViewModel : NodeScriptWindowViewModelBase
|
||||
{
|
||||
_keyBindingsEnabled = Shared.UI.CurrentKeyBindingsEnabled.ToProperty(this, vm => vm.KeyBindingsEnabled).DisposeWith(d);
|
||||
|
||||
Timer updateTimer = new(TimeSpan.FromMilliseconds(25.0 / 1000));
|
||||
Timer updateTimer = new(TimeSpan.FromMilliseconds(25));
|
||||
Timer saveTimer = new(TimeSpan.FromMinutes(2));
|
||||
|
||||
updateTimer.Elapsed += (_, _) => Update();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user