Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6973763
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T17:09:01+00:00 2026-05-27T17:09:01+00:00

I am a newbie writing code for sound playback via alsa api. I have

  • 0

I am a newbie writing code for sound playback via “alsa api”.

I have to repeatedly call a function send_output() 10 times in a sec as:

while(true)
{
     send_output();
     usleep(100000);
}

but this is a bad way of programming since within the usleep() function processor is still busy executing the code.

I want to know the way (for I know it exists) to put the function send_output() into a periodic callback function so that in between the calls, the processor can be kept free for other heavy tasks. Can you help me?

P.S. I am programming on ‘Beagleboard’ which has a very low clock rate and need to do other tasks too.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T17:09:01+00:00Added an answer on May 27, 2026 at 5:09 pm

    man usleep

       usleep - suspend execution for microsecond intervals
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

A newbie question. I have the following piece of Java code: import acm.program.*; import
Newbie question. I’m writing an ASP.Net MVC app in VB.Net and have been using
C++ newbie here. I am a science guy writing a cfd (ish) code. I
I am a newbie to writing JSPs. In my JSP I have dynamically created
python newbie here. I'm writing the code to control an experiment that has multiple
I'm a newbie with a little experience writing in BASIC, Python and, of all
I'm a total newbie, but I was writing a little program that worked on
I am newbie at using DataSet. I am writing a program with VB.NET, there
As a newbie to Python, and mainly having a background of writing scripts for
I'm a newbie programmer writting a program in MonoDevelop in C# and have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.