Skip to content

Commit 0ab77a9

Browse files
committed
Trigger every 40 seconds
1 parent a48afde commit 0ab77a9

3 files changed

Lines changed: 10 additions & 7 deletions

File tree

Installer/Lucid Scribe Interval.vdproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -411,15 +411,15 @@
411411
{
412412
"Name" = "8:Microsoft Visual Studio"
413413
"ProductName" = "8:Lucid Scribe Interval"
414-
"ProductCode" = "8:{F7AB52E0-2565-40B2-A35D-1BAAC9498336}"
415-
"PackageCode" = "8:{7B80C907-11F9-4D69-AD64-22C2F31DBCA5}"
414+
"ProductCode" = "8:{7B737FF4-4CB1-4CBA-B0B6-B47509BC231F}"
415+
"PackageCode" = "8:{D3787BE4-7299-4CC8-8021-FDC25F29BE66}"
416416
"UpgradeCode" = "8:{D69BA483-0900-4583-859C-3AAE825E4801}"
417417
"AspNetVersion" = "8:4.0.30319.0"
418418
"RestartWWWService" = "11:FALSE"
419419
"RemovePreviousVersions" = "11:FALSE"
420420
"DetectNewerInstalledVersion" = "11:TRUE"
421421
"InstallAllUsers" = "11:TRUE"
422-
"ProductVersion" = "8:1.0.3"
422+
"ProductVersion" = "8:1.0.4"
423423
"Manufacturer" = "8:lucidcode"
424424
"ARPHELPTELEPHONE" = "8:"
425425
"ARPHELPLINK" = "8:https://www.lucidcode.com/Contact"

Interval/PluginHandler.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ namespace lucidcode.LucidScribe.Plugin.Interval
44
{
55
public class PluginHandler : Interface.LucidPluginBase
66
{
7-
private int interval = 20;
7+
private int interval = 40;
88
private int lastSecond = -1;
9+
private DateTime lastTrigger;
910

1011
public override string Name
1112
{
@@ -17,16 +18,18 @@ public override string Name
1718

1819
public override bool Initialize()
1920
{
21+
lastTrigger = DateTime.Now;
2022
return true;
2123
}
2224

2325
public override double Value
2426
{
2527
get
2628
{
27-
if ((DateTime.Now.Second - 1) % interval == 0 &&
29+
if (DateTime.Now >= lastTrigger.AddSeconds(interval) &&
2830
lastSecond != DateTime.Now.Second)
2931
{
32+
lastTrigger = DateTime.Now;
3033
lastSecond = DateTime.Now.Second;
3134
return 888;
3235
}

Interval/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.3.0")]
36-
[assembly: AssemblyFileVersion("1.0.3.0")]
35+
[assembly: AssemblyVersion("1.0.4.0")]
36+
[assembly: AssemblyFileVersion("1.0.4.0")]

0 commit comments

Comments
 (0)