Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 25916c0

Browse filesBrowse files
committed
polish this example
1 parent 6ef2d99 commit 25916c0
Copy full SHA for 25916c0

File tree

2 files changed

+4
-3
lines changed
Filter options

2 files changed

+4
-3
lines changed

‎examples/timer/thread1.m

Copy file name to clipboardExpand all lines: examples/timer/thread1.m
+3-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ function thread1() %#codegen
22

33
stllog('hello from thread1');
44

5-
for i=1:20
5+
for i=1:100
66
stl.semwait(0)
7-
stl.log('wakeup');
7+
ii = int32(i)
8+
stl.log('wakeup %d', ii);
89
end
910
end
1011

‎examples/timer/user.m

Copy file name to clipboardExpand all lines: examples/timer/user.m
+1-1
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
stllog('thread id %d', t1)
1414

1515
timer = stl.timer('timer1', 2.0, s1);
16+
1617
join(t1); % wait for thread 1 to finish
1718

18-
1919
% done, exiting will tear down all the threads
2020

2121
end

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.