Skip to content

Commit

Permalink
Changed text
Browse files Browse the repository at this point in the history
  • Loading branch information
AtibQur committed Dec 9, 2024
1 parent e34534a commit 89c0d70
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,12 @@ cx.registerCallback("processCreated", handleProcessCreated);

2. **Callback implementation**

The `handleProcessCreated` function increments a `processCount` variable and triggers a callback if one is set via the processCallback function.

```js
function handleProcessCreated() {
processCount++;
if (processCallback) processCallback(processCount);
processCount++;
console.log(`Process count: ${processCount}`);
}

```

The purpose of the `processCreated` event is to maintain an up-to-date count of created processes. This information can be used to monitor system activity.
The `handleProcessCreated` function will now increment the `processCount` variable each time it's called.

0 comments on commit 89c0d70

Please sign in to comment.